If $x\equiv y \pmod{\gcd(a,b)}$, show that there is a unique $z\pmod{\text{lcm}(a,b)}$ with $z\equiv x\pmod a$ and $z\equiv y\pmod b$ 
If $x\equiv y \pmod{\gcd(a,b)}$, show that there is a unique $z\pmod{\text{lcm}(a,b)}$ with $z\equiv x\pmod{a}$ and $z\equiv y\pmod{b}$

What I have so far:
Let $z \equiv x\pmod{\frac{a}{\gcd(a,b)}}$ and $
z \equiv y\pmod b
 $. Then by the chinese remainder theorem there is a unique $z\pmod{\text{lcm}(a,b)}$ which satisfies this...
Is this the right approach here? I can't figure out how to get from $$z \equiv x\pmod{\frac{a}{\gcd(a,b)}}$$ what I need.

Put $d=\gcd(a,b)$ and $\delta=x\bmod d=y\bmod d$ (here "mod" is the remainder operation). Then the numbers $x'=x-\delta$, $y'=y-\delta$ are both divisible by$~d$. In terms of a new variable $z'=z-\delta$ we need to solve the system
$$
  \begin{align}z'&\equiv x'\pmod a,\\z'&\equiv y'\pmod b.\end{align}
$$
Since $x',y',a,b$ are all divisible by $d$, any solution $z'$ will have to be as well; therefore we can divide everything by$~d$, and the system is equivalent to
$$
  \begin{align}\frac{z'}d&\equiv \frac{x'}d\pmod{\frac ad},\\
               \frac{z'}d&\equiv \frac{y'}d\pmod{\frac bd}.\end{align}
$$
Here the moduli $\frac ad,\frac bd$ are relatively prime, so by the Chinese remainder theorem there is a solution $\frac{z'}d\in\mathbf Z$, and it is unique modulo $\frac ad\times\frac bd$. Then the solutions for $z'$ will then form a single class modulo $\frac ad\times\frac bd\times d=\frac{ab}d=\operatorname{lcm}(a,b)$, and so will the solutions for $z=z'+\delta$.
