In exercise I.5.2 in Harshorne there is the following definition of intersection multiplicity for two curves in $\mathbb{A}^2$: \begin{equation} \mathrm{length}_{\mathcal{O}_P}\mathcal{O}_P / (f,g) \end{equation} where $P$ is the point in the intersection we are interested in, $\mathcal{O}_P$ is its local ring in $\mathbb{A}^2$ and $f$ and $g$ are the polynomials giving the two curves.
On the other hand I found in various references, such as Fulton's Algebraic Curves, that the length is taken over $k$, the residue field of $\mathcal{O}_P$.
Since $k$ embeds in $\mathcal{O}_P$ naturally, I can see any sequence of $\mathcal{O}_P$-modules as sequence of $k$-modules and then I get that the length over $k$ is grater or equal than the length over $\mathcal{O}_P$.
At this point I guess the two definitions should be equivalent, but I am stuck in trying.
Any hint or answer about this is welcome!