I was able to prove that $5v^2+10$ cannot be a perfect square by working on the integers modulo 4 where the value of perfect squares are either 0 or 1. Initially, I tried to work in the integers modulo 5 but I couldn't arrive at a contradiction there. I would like to understand what kind of intuition a mathematician uses to pick the right modulo space where the contradiction can be shown. Is it simply trial and error or is there some kind of deeper reasoning / cleverness involved? And if so, how should I go about building this kind of intuition? Number theory books are full of clever solutions but there appears to be little in the way of methodology unlike other (undergraduate-level) math areas.
For the record my proof was that, in the integers modulo 4, perfect squares are either 0 or 1. Therefore $5*a+2$ must be congruent to 0 or 1 (mod 4), with $a$ being either 0 or 1, which is impossible.