I want to prove that this system has a unique solution $\pmod{\frac{mn}{g}}$, where $g= \gcd(m,n)$ provided that $g \mid b-a$
Here is my attempt.
From $x \equiv a \pmod{m}$ we know that $m \mid x-a$ and so there must exists an integer $k$ such that $mk = x-a$ and so $x = mk + a$. Now we substitute this equation for $x$ into the $2^{nd}$ congruence to get $mk + a \equiv b \pmod{n}$ which implies that $mk \equiv b-a \pmod{n}$ and so there must exists an integer $q$ such that $nq = mk -(b-a)$ and so $mk-nq = b-a$, we let $q' = -q$ so we now have $mk + nq' = b$ which is a diophantine equation. But I am suck here and I can't show that there is a unique solution $\pmod{\frac{mn}{g}}$ any suggestion ?