We always have $\frac {p^2 + q^2}{pq} \geq 2$.
If $\frac {p^2 + q^2}{pq} = 2$ then this implies $(p-q)^2 = 0$, so as desired $p = q$.
I have not been able to make headway in the case $\frac {p^2 + q^2}{pq}= N$, where $N \geq 3$.
I suppose the argument required is to show that $p^2 + q^2 = Npq$ has no integer solutions in $p$ and $q$.
I tried considering $p$ and $q$ in $\mathbb{Z}/2\mathbb{Z}$ and $\mathbb{Z}/N\mathbb{Z}$ respectively, but failed to draw any further conclusions. Am I perhaps missing some key detail here?
I also tried supposing $p \neq q$ and saying without generality loss $p > q$. Then $p = q + k$ for some integer $k \geq 1$. This leaves us with $\frac {p^2 + q^2}{pq} = 2 + \frac {k^2}{pq}$. Now somehow I need to argue $k = 0$, and I am not quite sure how.
Or perhaps some other lateral approach is more apt, other than the ones suggested.