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?

You are given that $a$ divides $x$. Therefore, you can write $x = ma$ where m is an integer. You are also given that $b$ divides $x$. This implies that $b$ divides $ma$. But $b$ and $a$ are coprime. Therefore $b$ must divide $m$. So you can write $m = kb$ where $k$ is another integer. Therfore, you have $x = kab$.
