Exercise 5.4 of Hartshorne defines the intersection multiplicity $(Y \cdot Z)_p$ of two distinct plane curves $Y = Z(f), Z = Z(g) \subset \mathbb A^2$ in $p \in Y \cap Z$ as the length of the $\mathcal O_p$-module $\mathcal O_p/(f,g)$.
I'm trying to understand it with a simple example: $$f = x^2 - y^2 + x^4, \qquad g = y$$ I think that $$k[x,y]/(x^2-y^2+x^4,y) \simeq k[x]/(x^2+x^4)$$ and that as $k$-algebras $$\mathcal O_p/(f,g) \simeq k[x]_{(x)}/(x^2+x^4) \simeq \big( k[x]/(x^2+x^4) \big)_{(x)}$$ but I don't know if that's really supposed to help me or not. How can I proceed? Is there a better approach?