This is the question.
Let $\gcd(m,n)=d$. Show that if $a=b$ (mod $d$), the equations $x=a$ (mod $m$) and $x =b$ (mod $n$) has a solution.
My thinking is this. Because $\gcd(m,n)=d$, there exists some $r,s$ integers such that $rm+sn = d$. So $r\frac{m}{d} + s\frac{n}{d} = 1$. Now, my idea is to define $x$ similar to that in the Chinese Remainder Theorem, letting $x = br\frac{m}{d} + as\frac{n}{d} \implies dx = brm+asn$. Now, $dx$ (mod $m$) $= asn = da$ (mod $m$). Similarly $dx= db$ (mod $n$). So $dx = da$ (mod $m$) = $db$ (mod $n$).
Here is where I'm stuck. I suppose now I should use the fact that if $a=b$ (mod $d$), then $dx = da$ (mod $m$) = $db$ (mod $n$) would imply $x=a$ (mod $m$) and $x =b$ (mod $n$), and the proposed $x$ above would work. But how do I do it? Any hints?