I am trying to show that $\operatorname{Spec}\mathbb{C}[x,y]$ contains exactly the ideals $(0)$, $(x-a,y-b)$ for $a,b\in\mathbb{C}$, and $(f)$ for an irreductible polynomial $f\in\mathbb{C}[x,y]$.
My approach (following a tip in Vakil's notes) is the following: clearly these ideals are all prime. It suffices then to prove that if $\mathfrak{p}$ is a prime ideal of $\mathbb{C}[x,y]$ which is not principal, then it is of the form $(x-a,y-b)$.
Since $\mathfrak{p}$ is not principal, it contains two polynomials $f,g$ without common factors. We then use Bézout in $\mathbb{C}(x)[y]$ to find $p,q\in \mathbb{C}(x)[y]$ such that $pf+qg=1$. Multiplying by a common denominator $h\in\mathbb{C}[x]$ we get $$p(x,y)f(x,y)+q(x,y)g(x,y)=h(x)$$ in $\mathbb{C}[x,y]$. It follows that $h\in (f,p)\subset\mathfrak{p}$. Since $\mathbb{C}$ is algebraically closed and $\mathfrak{p}$ is prime, there is $a\in\mathbb{C}$ such that $(x-a)\in\mathfrak{p}$. Similarly, there is $b\in\mathbb{C}$ such that $(y-b)\in\mathfrak{p}$. Finally, since $(x-a,y-b)\subset\mathfrak{p}$ and the former is maximal, we have equality.
There are just two points in this proof that I do not really understand. Firstly, why $\mathfrak{p}$ contains two polynomials without common factors? Also, why they remain relatively prime in $\mathbb{C}(x)[y]$?
Both appear to be obvious but I don't know how to prove them. (Two second fact seems closely related to Gauss' lemma but $\mathbb{C}(x)[y]$ isn't the fraction field of $\mathbb{C}[x,y]$.)
Since $\mathfrak{p}$ is a prime ideal, it has to contain some irreducible polynomial $h \in \mathbb{C}[x,y]$. For any other $l \in \mathfrak{p}$, either $h \mid l$ or $h$ and $l$ share no common factor. If $h \mid l$ for all $l \in \mathfrak{p}$ then $\mathfrak{p}$ is principal (generated by $h$). In the other case you have two polynomials with no common factor.
For the second fact, one can organize the relevant data as follows: If $R$ is a UFD and $K$ its field of fractions, and if two polynomials $f,g \in R[x]$ share no common factor then they share no common factor in $K[x]$ (converse is false, e.g. take $R = \mathbb{Z}$ and $K = \mathbb{Q}$ and $f = 2x$ and $g = 2(x+1)$).
To check the above statement, if $f,g$ do share a common nonunit factor $h \in K[x]$ (so that $h$ is not a constant polynomial) then there exists $r \in R \setminus \{ 0 \}$ with $rf$ and $rg$ sharing a common factor $k$ in $R[x]$ with $\deg k > 0$. That is, there exist $a,b \in R[x]$ with $rf = ak$ and $rg = bk$. Denoting $c(f)$ to be the content of $f$, write $f = c(f)f_0$, $a = c(a)a_0, b = c(b)b_0, k = c(k)k_0$ where $c(f_0), c(a_0), c(b_0), c(k_0)$ are all units in $R$. Then $r c(f)$ is an associate of $c(a)c(k)$ and likewise $r c(g)$ is an associate of $c(b)c(k)$, so $f_0$ is divisible by $k_0$ and $g_0$ is divisible by $k_0$. Since $\deg k_0 > 0$ and both $f_0,g_0$ are factors of $f,g$, $k_0$ is a factor of $f,g$, a contradiction.