I've tried out a few pairs of numbers for $a$,$b$ where I have combinations of prime-prime, prime-non prime, non-prime-non-prime, and I know the statement is true, but how should I go about proving this?
I know that if $\gcd(a,b)=1$ and $a|mb$, then $m=a$, $m=2a$, $m=3a$ etc. Does this then prove that $a|m$?