Update: I think there was a typo in the text. Please don't waste your time with this problem. :)
If gcd$(a,b) = p$, a prime, then $p|am$ and $p|an$ such that gcd$(m,n) = 1$
Why does gcd$(m,n)$ have to be equal to 1? And does this statement hold true if gcd$(a,b)$ is not equal to a prime?