Systematic way to solve modular equations? I'm studying for the sat, and one question was presented as follows:
If $n$ is a positive integer such that the units (ones) digit of $n^2+4n$ is $7$ and the units digit of n  is not $7$, what is the units digit of $n+3$?
So I'm trying to find $n$ such that:
$$(n^2+4n) \mod10=7$$
I know the answers are $n=9 \mod10$ and $n=7 \mod10$ from guessing and checking. However, time is limited to about $1$ min a question.
So I'm looking for someone to teach me how these algebra problems can be systematically solved. I would prefer an answer that does not say "use _ theorem".
 A: There is no such general approach that I know of, but in general these problems only look difficult (possibly because you lack training or self-confidence), in reality they are really simple and 1 minute should suffice for each of them.
You have $n (n + 4) = n^2 + 4n \equiv 7 \pmod {10}$ and $n \not\equiv 7 \pmod {10}$.
Question: what may be the last digits of $n$ and $n+4$ such that their product should have the last digit $7$? We only have the possibilities $(1, 7)$, $(7, 1)$, $(3, 9)$, $(9, 3)$.
Note that the possibility $(7, 1)$ is ruled out by the requirement that $n \not\equiv 7 \pmod {10}$.
Note also that if $n \equiv 3 \pmod {10}$, then $n^2$ ends in $9$ and $4n$ ends in $2$, so $n^2 + 4n$ ends in $9 + 2 \equiv 1 \pmod {10}$, not in $7$ as required. Similarly, if $n \equiv 1 \pmod {10}$, then $n^2 + 4n$ ends in $1^2 + 4 \cdot 1 \equiv 5 \pmod {10}$, again not satisfying the requirement of the problem.
Therefore, the only remaining possibility for the last digits of the pair $(n, n+4)$ is $(9, 3)$, so that the last digit of $n+3$ is $9 + 3 \equiv 2 \pmod {10}$.
A: If you want a "systematic" way to look at problems like these (if you get stuck and don't see any quick shortcuts), one approach might be to see that your equation
$$n^2+4n - 7 \equiv 0 \bmod 10$$
can still be solved with the quadratic formula, except you use modular arithmetic:
$$n \equiv (-b\pm\sqrt{b^2-4ac})(2a)^{-1} \bmod 10$$
where $a=1, b=4, c=-7$. Then:
$$n \equiv (-4\pm\sqrt{44})2^{-1} \bmod 10$$
Or:
$$n \equiv (-2\pm\sqrt{11}) \bmod 10$$
Now this problem reduces to computing $\sqrt{11} \bmod 10$, which can be framed as $x^2 \equiv 11 \equiv 1\bmod 10$, which has solutions $x \equiv 1,9$ mod $10$.
Plugging these into the last congruence for $n$ above, we see that $n \equiv 7, 9$ mod $10$. But since $7$ is forbidden by the problem description, this leaves $n \equiv 9 \bmod 10$. Therefore the units digit of $n+3$ is $9+3 \equiv 12 \equiv 2 \bmod 10$.
Another approach
You can also try completing the square:
$$n^2+4n +  - 7 \equiv (n+2)^2-11 \equiv 0 \bmod 10$$
If we let $x = n+2$, we are now back to finding $x^2 \equiv 11 \equiv 1 \bmod 10$. The solutions $x \equiv 1,9 \bmod 10$ imply that $n \equiv -1, 7 \equiv 9, 7 \bmod 10$, etc.
