I am pretty sure the answer is yes.
I normally work over $\mathbb{C}$ so i will do so here as well, to prevent myself from making silly mistakes.
In projective space, one has Serre's famous definition of the intersection multiplicity. If we are dealing with two curves that lie on a surface $C,D \subset S$ there is another definition of intersection multiplicity, see Beauville, complex algebraic surfaces, definition I.2.
Given two curves $C, D \subset S \subset \mathbb{P}^n$, one can use both definitions to calculate the intersection multiplicity of the two curves. My question is now: do they always agree?
I have the idea that a solution should go somehow like this: A intersection of two such curves is always Cohen Macauly, so we can discard the higher Tor terms in Serre's definition. Then use some commutative algebra to make the two expressions equal. However, i have no idea whether these claims are even true, let alone how to prove them. Especially my commutative algebra is not strong.
Even though a full proof would be awesome, i am very much satisfied with a yes or no answer combined with a sketch of a proof.
Many thanks!
For completeness i state the definitions below:
Serre:
Let $X$ be a smooth variety and $V, W$ two closed irreducible and reduced subvarieties represented by ideal sheaves $I$ and $J$. The intersection multiplicity on an irreducible component $Z$ of $V\cap W$ is $$ \mu(Z;V,W)=\sum_{i=0}^\infty (-1)^i \operatorname{length}_{\mathcal{O}_{X,z}} (\operatorname{Tor}^i_{\mathcal{O}_{Z,z}}(\mathcal{O}_{X,z}/I,\mathcal{O}_{X,z}/J)) $$ where $z$ is the generic point of $Z$.
Beauville:
Let $C,D$ be two distinct irreducible curves on a smooth surface, $x \in C \cap D$ and $\mathcal{O}_x$ the local ring of $S$ at $x$. Let $f$ resp. $g$ be a local equation for $C$ resp. $D$ in $\mathcal{O}_x$. Then $$ \mu(x; C, D) = \dim_{\mathbb{C}}\mathcal{O}_x/(f,g) $$
Since no one seems to have offered an answer, at least I would like to point out some references and motivational ideas for your second definition.
The motivation for the Beauville definition appears in
Essentially that is the abstract definition at which they arrive for proving that the geometric definition via the algebraic multiplicity of the common points of intersection, given classically by elimination theory using the resultant of the polynomials of both curves, is independent of the affine local coordinates and thus intrinsic. This is why Beauville and other authors (like Hulek, Harris or Perrin) begin directly with the intrinsic characterization as definition, instead of mentioning that this comes from the algebraic characterization of the intersection points in the same manner as the multiplicity of a polynomial crossing the x-axis, i.e. having a multiple root.
The other more abstract and general definition using homological algebra is highly related to the homological conjectures and Serre's multiplicity conjectures, which are treated in detail in here:
Specially the first and last titles show the equivalence of both definitions in a very general setting: if two subvarieties $V,W$ of a nonsingular variety $X$ meet propertly at a point $P$, Serre showed that YES, classical intersection multiplicity (for example via Samuel multiplicity which reduces to your formula for the case of curves) is given by: $$i(P, V\cdot W; X)=\sum (-1)^i\;\text{length}(\text{Tor}_i^A(A/I, A/J)),$$ where A is the local ring of $X$ at $P$, and $I, J$ are the ideals of V and W. A proof of this is in Fulton's book above, but it is not straightforward as it requires the reading of several chapters to make all the connections from his definitions.