I am reading Vakil's Algebraic Geometry lecture note, and the following is the proof of the statement that any non-principal prime ideal of $\Bbb C[x,y]$ is of the form $(x-a,y-b)$ for some $a,b\in \Bbb C$.
Suppose $\mathfrak{p}$ is a prime ideal that is not principal. Then we can find $f,g\in \mathfrak{p}$ with no common factor. By considering the Euclidean algorithm in $\Bbb C(x)[y]$, we can find a nonzero $h(x)\in (f,g)\subset \mathfrak{p}$. Since $\mathfrak{p}$ is prime, one of the linear factors of $h(x)$, say $x-a$, is in $\mathfrak{p}$. Similarly $y-b\in \mathfrak{p}$ for some $b\in \Bbb C$.
My question is: how can we find such $h(x)$ using Euclidean algorithm?