Let $n$ and $m$ be integers such that $5$ divides $1+2n^2+3m^2.$ Then show that $5$ divides $n^2-1.$ 
Let $n$ and $m$ be integers such that $5$ divides $1+2n^2+3m^2.$ Then show that $5$ divides $n^2-1.$

$\textbf{My attempts} :$
From the condition, we can write $$1+2n^2+3m^2\equiv 0(\mod 5)\tag 1$$
Now, since $5$ is prime so by Fermat's little theorem, we can write $$n^4\equiv 1(\mod 5)\quad\text{and} \quad m^4\equiv 1(\mod 5).$$
So, we get $n^4-m^4\equiv 0(\mod 5)$.
Since $5$ prime so, either $5|(m^2+n^2)$ or $5|(m^2-n^2).$
Now if $5|(m^2+n^2)$ then from $(1)$ we get $$1-n^2+3n^2+3m^2\equiv 0(\mod 5)$$ So, we are done.
Now, if $5|(m^2-n^2)$ then from $(1)$ we get $$1+5n^2-3n^2+3m^2\equiv 0(\mod 5).$$ So, we shall arrive at a contradiction that $1\equiv 0(\mod 5).$
In this way, I have tried to solve this problem. I will be highly obliged if you kindly check this or correct me.
Thanks in advance.

squares are $0,1,4 \pmod 5$   so $3m^2 \equiv 0,3,2 \pmod 5,$ next $1+3m^2 \equiv 1,4,3 \pmod 5$ Finally
$$ -(1+3m^2)  \equiv 4,1,2 \pmod 5 \; , \; \;  $$
$$  2 n^2 \equiv 0,2,3 \pmod 5 $$
The overlap of these two lists, $4,1,2$  and $0,2,3$  is the single possibility $2.$  That is, we need $2n^2 \equiv 2 \pmod 5$ and $n^2 \equiv 1 \pmod 5$
