If $m^2 +n^2 - m$ is a multiple of $mn$ and $p$ divides $m$ then $p^2$ divides $m$ Given natural numbers $m,n$ such that $m^2 + n^2 - m \equiv 0 \pmod{mn}$ and $p$ a prime dividing $m$, then I want to show that $p^2$ divides $m$. 
I have tried multiple approaches: Euclidean division gives that $m = qp^2 + r$ for some $q, r \in \mathbb{N}$ where $0 \leq r < p^2$ and filling this in to show that $r = 0$. I also tried using that $p$ divides $m$ and $mn$ divides $m^2 + n^2 - m$ and again filling this in to find that $p^2$ has to divide $m$, but with no succes. 
Any hints would be appreciated.
$\textbf{EDIT}$ Based on the given hint I have the following solution:
Since $p$ divides $m$, we have that $p$ divides $mn$ and therefore $m^2 + n^2 - m$. Hence, there is some $k \in \mathbb{Z}$ such that $kp = m^2 + n^2 -m$ and therefore we have that $kp - m^2 + m = n^2$, so that $p$ divides $n^2$. Since $p$ is prime, it must divide $n$. Since $p$ divides both $m,n$ we have that $p^2$ divides $mn$ and therefore $m^2 + n^2 - m$. Also $p^2$ divides $m^2, n^2$ hence it must divide $m$.

$p$ divides $m\implies p$ divides both $mn$ and $m^2-m=m(m-1)$.
$p$ divides $mn$ and $mn$ divides $m^2+n^2-m\implies p$ divides $m^2+n^2-m$.
$p$ divides both $m^2-m$ and $m^2+n^2-m\implies p$ divides their substraction $m^2+n^2-m-(m^2-m) = n^2$.
$p$ is prime and $p$ divides $n^2=n\cdot n\implies p$ divides $n$.
Conclusion:$p$ divides both $m^2$ and $n^2\implies p$ divides $m^2+n^2-(m^2+n^2-m) =m$. 
