This is an olympiad question, I don't know how to solve. Please tell me the logic/algorithms/steps I should follow to solve the question.
Find the number of ordered pairs of distinct positive primes $p, q$ ($p$ not equal to $q$) such that $$p^2 + 7pq + q^2$$ is the square of an integer.
The first hint is that
$$ p^2 + 7pq + q^2 \equiv N^2 $$
and see if you can rearrange the expression by separating the squares; does that tell you anything about the nature of $p$ and $q$?