Good day to all,

I have been asked the following question:

Prove that if p is prime and p|n^2 then p|nI have attached my proof and was hoping to get an opinion on it, to see if I have understood the material and where I need to tighten up the proof.

Thanks