If $\gcd(a,b) = 1$ and $a,b\mid x$ then $ab\mid x$. If $\gcd(a,b) = 1$ and $a,b\mid x$ then $ab\mid x$.
My attempt at answering the question:
\begin{align*}
x &\equiv 0 \pmod{a}\\\
&\Longrightarrow x\text{ is divisible by $a$}\\\
&\Longrightarrow x = ma\text{ for some integer $m$}\\\
\ \\\
x &\equiv 0 \pmod{b}\\\
&\Longrightarrow  x\text{ is divisible by $b$}\\\
&\Longrightarrow x = mb\text{ for some integer $m$}\\\
\ \\\
x^2 &= (ma)(mb)\\\
x^2 &= (m^2)(ab)\\\
x &= \sqrt{m^2ab}\\\
x &= m\sqrt{a}\sqrt{b}
\end{align*}
Let $m$ be $k\sqrt{a}\sqrt{b}$. Then
\begin{align*}
x &= kab\\\
&\Longrightarrow x \equiv 0 \pmod{ab}
\end{align*}
Is this correct, if not can someone point me in the right direction?

$\gcd(a,b)=1$ so there are integers $s$ and $t$ such that $sa+tb=1$, whence $sax+tbx=x$. But $a$ divides $x$ so $x=ax'$ for some integer $x'$. As $b$ divides $x$, $x=bx''$ for some integer $x''$. Substituting on the left-hand side of the preceding equation yields $sabx''+tabx'=x$. Factor out the common $ab$ on the left to get $ab(ax''+tx'')=x$, so that $ab$ divides $x$.
