Let $a, b \in R$ be nonzero and suppose that gcd($a, b$) = $d$ for some $d \in R$. Show that $c \in R$ is also a gcd of $a$ and $b$ if and only if $c$ and $d$ are associates.
I am not too sure how associates relate to greatest common divisors.
I know that the greatest common divisors of $a$ and $b$ are associates of one another as shown with GCD domains but I am stuck with definition pushing. Any feedback would be much appreciated.
I'm gonna use the definition of $\gcd$ in wikipedia.
Let $a,b\in R$, and suppose $\gcd(a,b)$ exists (there is at least one $d$ for which every common divisor of $a$ and $b$ divides $d$, and $d$ is a common divisor of $a,b$).
So suppose there are two such elements in $R$ satisfying that condition: $d$ and $d'$. Then, $d$ divides $d'$, and $d'$ divides $d$ by the condition. So, there exist $x,y\in R$ such that $d=xd'$ and $d'=yd$. Therefore, $d=xyd$. Since we are in an integral domain, since $d\neq 0$, $d-xyd=0$ implies $xy=1$. So $x$ and $y$ are units, and by definition $d$ and $d'$ are associates.
Suppose $d$ and $d'$ are associates, with $d$ a $\gcd$. Then, to prove that $d'$ is also a $\gcd$, we have that $d=ud'$ for some unit $u$. So $d'$ divides $d$. Furthermore, let $c$ be a common divisor of $a,b$ that divides $d$. So $d=cw$ for some $w\in R$. Then $ud'=cw$ which is the same as $d'=cwu^{-1}$. Hence $c$ also divides $d'$, and we are done.