Coprime polynomials in $k[x,y]$ are also coprime in $k(y)[x]$ 
Let $f,g \in k[x,y]$ be polynomials with no common factor. Prove that when viewed as elements of $k(y)[x]$ they still do not have a common factor.

Say we have $f=\sum a_{ij}x^iy^j,\ g=\sum b_{ij}x^i y^j$, and $h=\sum h_i(y) x^i \in k(y)[x]$ satisfies both $h \mid f$ and $h\mid g$. Hence $f = hp$ for $p = \sum p_{i}(y)x^i \in k(y)[x]$ and similarly for $g=hq$.
The claim is noted here. However I don't understand the argument implied there, of multiplying by the lcm of the denominators of all terms in $h$ and all terms in the divisors $p,q$: we get a relation of the form $f \cdot \text{lcm(complicated polynomial w(y))}=hpw \in k[x,y]$, what is the common factor in $k[x,y]$ of $f,g $ here? (A concrete example will probably help.)
Where do we use that $k(y)[x]=\mathbb{F}[x]$ is a euclidean domain and in particular a PID?
 A: 
Let $R$ be a GCD domain, and $f,g\in R[X]$ such that $\gcd(f,g)=1$ (in $R[X]$). Then $\gcd(f,g)=1$ in $K[X]$, where $K$ is the field of fractions of $R$.

Let $h\in K[X]$ such that $h\mid f$ and $h\mid g$ (in $K[X]$). We want to show $\deg h=0$.  
Let $d$ be the product of all denominators of the coefficients of $h$, and $k=dh\in R[X]$. Then $k\mid df$ and $k\mid dg$ in $K[X]$, so there are $a,b\in R\setminus\{0\}$ such that $k\mid (ad)f$ and $k\mid (bd)g$ in $R[X]$. Write $(ad)f=kp$ and $(bd)g=kq$ with $p,q\in R[X]$.   
In the following one denotes by $c(r)$ the greatest common divisor of the coefficients of $r\in R[X]$, and write $r=c(r)r_1$ where $r_1$ is primitive, that is, the greatest common divisor of its coefficients is $1$. 
From $(ad)f=kp$ and $(bd)g=kq$ we get $(ad)c(f)=c(k)c(p)$ and $(bd)c(g)=c(k)c(q)$. But $(ad)c(f)f_1=c(k)c(p)k_1p_1$ and $(bd)c(g)g_1=c(k)c(q)k_1q_1$, so $f_1=k_1p_1$ and $g_1=k_1q_1$. Thus we get $k_1\mid f_1\mid f$ and $k_1\mid g_1\mid g$, so $k_1=1$, and we are done.
