If $n$ divides $m$, then $n$ divides $m^2$ I have been asked in one of my problem sheets to prove that if $3$ divides $n$, then $3$ divides $n^2$. 
So what I did was: Write $n=3d$, $d$ is an integer. So $n^2=9d^2$, therefore $n^2=3*3d^2=3c$, where $c$ is an integer. 
QED. 
But then the same method works in general for any number other than $3$. 
Where am I making a mistake? 

You have no mistake,
$n^2 = n*n$
therefore, if m divides n:
$n=mc,c\in Z$
$n^2=m(mc^2)$
$mc^2\in Z$
therefore m divides $n^2$.
