The fact that powers of $m$ stabilize says that the local ring $A_m$ is artinian. Clearly, it is also noetherian.
By the Jordan-Hoelder theorem, $A_m$ has a finite composition series. The length $l$ of this series is the length of a maximal sequence of ideals $A_m=I_0\supsetneq I_1\supsetneq I_2\supsetneq\cdots\supsetneq I_l=0,$ where $I_i/I_{i+1}$ is a simple $A_m$-module. This last condition implies that $I_i/I_{i+1}\cong A/m =k$ for each $i,$ so we are really computing the $k$-linear dimension of $A_m,$ as in your first definition.
By assumption, we know that $m^{i+1}\subsetneq m^i$ for $i which implies that $m^N\subsetneq m^{N-1}\subsetneq\cdots\subsetneq m\subsetneq A_m$ is a chain of submodules that can be extended to a composition series for $A_m.$ Suppose this is how we obtained the above.
Consider $A/m^N$. Let $\overline p=p/m^N\subseteq A/m^N$ be a prime ideal, where $p\subseteq A$ is prime. Then $p$ contains $m^N,$ and so $p$ contains $m.$ Thus, $p=m,$ and since any prime ideal of $A/m^N$ can be written this way, $A/m^N$ contains a unique prime ideal, $m/m^N.$ This proves that $A/m^N$ is artinian local, since its only prime ideal is maximal.
So $A/m^N$ also has a composition series, which computes its length, i.e. its linear dimension. Of course, since $A/m^N$ is local, we know that $A/m^N=(A/m^N)_m=A_m/m^N.$ Consider the chain $0\subseteq I_{l-1}/m^N\subseteq\cdots\subseteq A_m/m^N.$ Suppose that $I_i\subsetneq m^N,$ and $i$ is minimal with this property. By construction, $m^N=I_{i-1}$ and $m^N/I_i=k=A_m/m.$ However, $m$ annihilates $k,$ so $0=m\cdot(m^N/I_i)=m^{N+1}/I_i=m^N/I_i=k,$ which is absurd. Hence, we must have had all along that $m^N=I_l=0.$
Further, for all other $i$ we have $(I_i/m^N)/(I_{i+1}/m^N)\cong I_i/I_{i+1}=k,$ by the third isomorphism theorem.
This shows that $0\subsetneq I_{l-1}/m^N\subsetneq\cdots\subsetneq A_m/m^N=I_0/m^N$ is a composition series for $A_m/m^N\cong A/m^N,$ and so the length as a $k$-module must be equal to that of $A_m.$