tonio appears to be busy, so I'll give you a link to look at. This is a standard proof of this problem, but uses another lemma which you may not have covered and be allowed to use.
Euclid's lemma - Wikipedia, the free encyclopedia
I was mistaken, my apologies. I have found multiple sources defining prime numbers this way.
Assume p|mn, thus for some integer q, pq=mn. By definition of prime, the gcd(m,p)=1 or gcd(m,p)=p. If gcd(m,p)=p, then p|m and the desired result is shown. If gcd(m,p)=1, then p|gcd(m,p)n. See here for a proof.
Here is the whole proof I outlined above. I'm sorry to link so much but I don't really know what you can use or not so I don't want to type out a bunch of stuff for nothing. Does the above info help?
There are multiple sources that use that definition. I even hear Keith Devlin use it.
But nonetheless, strictly speaking it is incorrect.
That definition makes 1 a prime number.
The number 1 has only 1 and itself as divisors.
So I think that the correct wording is: A positive integer is prime if and only if it has exactly two divisors.
You understand that 1 has only one divisor: itself.
Look at the link I gave. It comes down to using the fact that if gcd(a,b)=d given a|bc then there exist integers x,y such that ax+by=d. This is just basically saying that if a and b are both multiples of d, then some linear combination of them can result in d. Look at the link for the next steps.
I don't know if you can use this though, or if you are supposed to do it another way.