intersection multiplicity from Shafarevich In Basic Algebraic Geometry, Shafaravich proves the following theorem:
Theorem. If $X$ is an irreducible affine curve, and $P \in X$ is a nonsingular point, then there is a function $t$, regular at $P$, such that every rational function $u$ on $X$ is expressed as $u = t^k v$ for some regular $v$ at $P$. $k$ is called the order of the zero at $P$ of $u$, and $t$ is called the local parameter on $X$ at $P$.
Now, given irreducible curves $X: f = 0$ and $Y: g = 0$, with neither $X$ contained in $Y$ nor vice versa, for a point $P \in X \cap Y$, the intersection multiplicity at $P$ is defined as the order of the zero of $g$ at $P$.
Given these definitions, how could one find the intersection multiplicity of a line through $P$ and a cubic $X$?
He parameterizes a line using the local paramater, but somehow that seems unnecessary.
Here's what I've been thinking: Let $X: f = 0$ be our curve and let $L: y=mx+b$ be a line through $P$ where $P \in X \cap L$. Then we view $f$ as a regular function on the line as $f(x,mx+b)$ and somehow get some local parameter $t$ 
so $f(x,mx+b) = t^k v$.... in the case $P = (0,0)$ we would maybe get $f(x,mx+b) = x^k v$ or something. I don't really know.
I don't really understand the example that Shafaravich gives, and I'm only really familiar with the material from pages 1-14 of Shafarevich, so I'm not familiar with the definition using local rings.
 A: The main things you need are that:
(1) $t = x - x_0$ is a local parameter on $L$ for $P$ where $x_0$ is the $x$-coordinate of the point $P$.  (Without loss of generality, you can assume you have chosen coordinates so that $x_0 = 0$.)
(2) Since $f(x,y)$ is a cubic polynomial, $f(x, mx+b)$ will be a polynomial of degree $\leq 3$ in $x$ and hence also in $t = x - x_0$.  Since $f(x, mx+b)$ is zero when $t = 0$, $f$ cannot be a non-zero constant polynomial.  Also, $f(x, mx+b)$ cannot be identically zero unless $L$ is contained in the cubic $X$ (impossible since the cubic $X$ is assumed to be irreducible).  Thus $f(x,mx+b)$ will be a polynomial of degree $1 \leq \deg(f) \leq 3$ in $t$, and the intersection multiplicity of $L$ and $X$ at $P$ is the order of the zero $t = 0$, i.e. the integer $1 \leq k \leq 3$ such that $f = t^k g$ with $g(t = 0) \neq 0$.
A good exercise is to come up with specific cubic polynomials $f(x,y)$ and lines $L$ so that the intersection multiplicity is each of $1$, $2$, and $3$.
