Consider two varieties over an algebraically closed field $k$ given by $f=0$ and $g=0$ that intersect at some point (without loss of generality $(0,0)$) with no common components, and $f$ and $g$ have no irreducible common factor.
The standard definition of intersection multiplicity is then the dimension (as a $k$-module) of
$$\left( \frac{k[x,y]}{(f,g)} \right)_{(x,y)},$$
where the subscript denotes localization at the ideal $(x,y)$.
Another definition, which I have been assured is equivalent, is as follows. The ring
$$A= \frac{k[x,y]}{(f,g)} $$
has a maximal ideal $m=(x,y)$. It's a theorem that powers of $m$ eventually stabilize: there exists $N$ such that $m^{n}=m^{n+1}$ for all $n\ge N$. The intersection multiplicity is then defined as the dimension of $A/m^N$.
My question: Why are these two definitions equivalent? My commutative algebra is weak, so a detailed answer would be very much appreciated. Thanks.