Is this an acceptable congruency proof? I have a past exam question that I proved as follows:
$$(\forall n\in \Bbb Z)\bigl((3n^2-5\equiv 2 \pmod 4)\lor(3n^2-5\equiv 3 \pmod 4)\bigr)$$
If odd:
$$3n^2 - 7 = k4,k\in \mathbb Z$$
$$3(2l+1)^2 - 7 = k4, l\in \mathbb Z$$
$$12l^2+12l-4 = 4k$$
$$3l^2+3l-1=k$$
If even
$$3n^2 - 8 = k4$$
$$3(2l)^2 - 8 = k4, l\in \mathbb Z$$
$$12l^2 -8 = 4k$$
$$3l^2-2=k$$
$$\therefore \forall n \in \mathbb Z,   3n^2 - 5 \equiv (2\mod 4) \lor (3 \mod 4)$$
Is this a sufficient proof for this question? Any tips to improve?
Edit: Also I feel like I got lucky with the whole even or odd thing, and I don't want to rely on that in the exams, how do people determine how they are going to attack this sort of problem? Or is it a matter of lots of practice?

If that is the requested proof style, probably you proved the thing; but my opinion is “that's cryptography, rather than mathematics“. You probably have better to say that you're going to find $k$, assuming that $n$ is odd or even.
But before plunging in algebraic substitutions, it's better to simplify the problem. You'll probably see how the exercise was conceived.
The statement is equivalent to showing that $3n^2\equiv 2+5\pmod{4}$ or $3n^2\equiv3+5\pmod{4}$ that's the same as
$$
3n^2\equiv 3\pmod{4}\quad\text{or}\quad 3n^2\equiv0\pmod 4
$$
Since $3\cdot3=9\equiv 1\pmod{4}$, the statement becomes
$$
n^2\equiv 1\pmod{4}\quad\text{or}\quad n^2\equiv0\pmod 4
$$
Now it should be easier.
