I need some help with this proof.
Given $R=\mathbb{Z}$ or $R=K\left [ X \right ]$ for some field $K$, I want to show for $d,p,q \in R$ that $\gcd(p,q)d \mid \gcd(pd,qd)$ and $\gcd(pd,qd)\mid \gcd(p,q)d$.
What I have so far is:
Since $\gcd(p,q) \mid p$ and $\gcd(p,q) \mid q$, there are $x,y \in R$ such that $p=x\cdot\gcd(p,q)$ and $q=y\cdot\gcd(p,q)$. We get $pd = (x\cdot\gcd(p,q))d=x\cdot(\gcd(p,q)\cdot d)$ and $qd = (y*\gcd(p,q))\cdot d=y \cdot (\gcd(p,q) \cdot d)$. Thus, $\gcd(p,q)d \mid pd$ and $\gcd(p,q)d \mid qd$. It follows $\gcd(p,q)d \mid \gcd(pd,qd)$.
However, I'm struggling with the other way around, i.e. showing $\gcd(pd,qd)\mid \gcd(p,q)d$, as not all elements in $R=\mathbb{Z}$ have an inverse.
The fact that $\gcd(pd,qd) = \gcd(p,q)d$ follows from the Eulcidean Algorithm. Perform the Euclidean Algorithm on $p,q$ and then multiply every row by $d$ to derive the conclusion.
Another way to prove the claim is to use the fact that $\exists x,y$ s.t. $px + qy = \gcd(p,q)$. Soo now:
$$\gcd(pd,qd) \mid pxd + qyd = (px+qy)d = \gcd(p,q)d$$