While I suspect that you are looking for some kind of homological algebra answer, here's a naive algorithm to get what you want:
Suppose that one is trying to determine the 'contact $k$-type' of a pair of algebraic surfaces at a point $p\in\mathbb{R}^3$. One may as well assume that $p$ is the origin and let the surfaces be defined by polynomial equations $f(x,y,z)=0$ and $g(x,y,z)=0$.
Of course, one must have $f(0,0,0)=g(0,0,0)$ or else the surfaces don't both pass through $p$.
Also, you are assuming that the 'surfaces are regular', by which, I am guessing that you want that $\nabla f$ and $\nabla g$ don't vanish at $p$, so I'll assume that. If $\nabla f\wedge\nabla g$ does not vanish at $p$, then the surfaces aren't tangent at $p$, so assume that $\nabla f\wedge\nabla g$ vanishes at $p$. Under these assumptions, you can, by a linear change of coordinates, assume that $f$ has the form
$$
f(x,y,z) = z - f_2(x,y,z),
$$
where $f_2$ vanishes to order $2$ at $p=(0,0,0)$. Then, of course, one has
$$
g(x,y,z) = az + g_2(x,y,z)
$$
for some $a\not=0$ and some polynomial $g_2$ that vanishes to order $2$ at $p$.
Now define a sequence of polynomials $h_i(x,y,z)$ as follows:
$$
h_2(x,y,z) = g\bigl(x,y,f_2(x,y,z)\bigr)
$$
and, for $k\ge 2$,
$$
h_{k+1}(x,y,z) = h_k\bigl(x,y,f_2(x,y,z)\bigr).
$$
One can now prove, by induction, that, when one writes, for $k\ge 1$,
$$
h_{k+1}(x,y,z) = p_k(x,y,z) + R_{k+1}(x,y,z),
$$
where $p_k$ has degree at most $k$ and $R_{k+1}$ vanishes to order $k{+}1$ at $p$, then $p_k$ is a polynomial in $x$ and $y$ only, and it defines the $k$-th order contact type between the two surfaces at $p$. (Of course, $p_1=0$.)
There is still the task of determining when two $p_k$'s are equivalent under change of variable in $x$ and $y$, but that's another issue.