This is a bit embarrassing (and hopefully hasn't been asked before). Let $F$ be a field and $p(x,y)$ be a polynomial in $F[x,y]$. Suppose that $p(x,x)=0$. For most authors it is obvious that this implies that $x-y$ is a factor of $p$. For me, however, it doesn't seem so easy. The only argument I found is the following: Consider $p$ as a univariate polynomial in $y$ over the function field $F(x)$. Then $p$ has the root $x$, so we can factor the linear term $y-x$ (using that $F(x)[y]$ is an Euclidean domain). Since $y-x$ is monic, the polynomial division does not introduce denominators. Hence, the complementary factor lies in $F[x,y]$.
Question: Is there a more direct argument?