Definition of intersection multiplicity in Hartshorne VS Fulton for plane curves

Given a finitely generated module $M$ over a noetherian ring $A$, there exists a filtration of $M$ by submodules $M=M_0\supset M_1\cdots \supset M_n=0$ such that $M_i/M_{i+1}\cong A/\mathfrak p_i$ for some prime ideals $\mathfrak p_i\subset A$ (Bourbaki, Commutative Algebra, Chapter IV, §1, Theorem 1, page 261)

Now $M$ has finite length iff all the $\mathfrak p_i$'s are maximal and this applies in our case, where $A=\mathcal O_P$ and $M=\mathcal{O}_P / (f,g)$.
We then have $\mathfrak p_i=\mathfrak m_P\subset A=\mathcal O_P$ and finally $$\mathrm{length}_A M=\sum_i \mathrm{length}_A(M_i/M_{i+1})=\sum_i \mathrm{length}_A(A/\mathfrak m)=\sum_i \mathrm{length}_Ak=\sum_i 1=n=\mathrm{dim}_kM$$

Remarks
1) I have assumed that $M=\mathcal{O}_P / (f,g)$ has finite length: this follows from its finite $k$-dimensionality which itself follows from the finiteness of the intersection of two curves with no common irreducible component.
2) In all of the above I have not assumed $k$ algebraically closed.


We have $\operatorname{length}_{\mathcal{O}_P} \mathcal{O}_P/(f,g) = \operatorname{length}_{\mathcal{O}_P/(f,g)} \mathcal{O}_P/(f,g)$. So it is enough to show that the latter equals $\operatorname{length}_k \mathcal{O}_P/(f,g)$.

Let $A = \mathcal{O}_P / (f,g)$, $\mathfrak{m}$ its maximal ideal, and assume that the two curves have no components in common, so that $(A,\mathfrak{m})$ is an artinian local $k$-algebra.

For some $n$, we have a chain of $A$-modules $(0) = \mathfrak{m}^n \subset \mathfrak{m}^{n-1} \subset \cdots \subset \mathfrak{m} \subset A$. Furthermore, $\mathfrak{m}^j/\mathfrak{m}^{j+1}$ is finite-dimensional as a $k$-vector space for each $j\geq 0$, so we have $\dim_k A = \sum_{j=0}^{n-1} \dim_k \mathfrak{m}^j/\mathfrak{m}^{j+1}$.

If $k$ is algebraically closed (or, as Georges has pointed out, if $P$ is a rational point), then $A/\mathfrak{m} \cong k$. Each $\mathfrak{m}^j/\mathfrak{m}^{j+1}$ is a finite-dimensional vector space over $k$, so $\dim_k A = \sum_{j=0}^{n-1} \operatorname{length}_k \mathfrak{m}^j/\mathfrak{m}^{j+1} = \sum_{j=0}^{n-1}\operatorname{length}_{A/\mathfrak{m}} \mathfrak{m}^j/\mathfrak{m}^{j+1} = \sum_{j=0}^{n-1}\operatorname{length}_A \mathfrak{m}^j/\mathfrak{m}^{j+1} \leq \operatorname{length}_A A$.