Let $S$ be a ring with subring $R$, both PIDs. Let $a, b \in R$ with gcd $r \in R$. If $s \in S$ is the gcd of $a$ and $b$ when considered in the larger ring $S$, prove that $r = su$ for some unit $u \in S$.
I am trying to exploit the fact that the ideal $(a, b) = (s)$ and any other generator of the ideal $(a, b)$ is a unit multiple of $s$. It is clear from the definition of gcd that $r | s$ which implies that $(s) \subset (r)$. These ideals are generated in $S$, I have given some thought as to what I get from considering them as ideals of $R$. Still I can not see how to proceed.
Any suggestions are appreciated. Thanks in advance.