<s>[INST] Let $n$ be an integer. If the tens digit of $n^2$ is 7, what is the units digit of $n^2$? 
Let $n$ be an integer. If the tens digit of $n^2$ is 7, what is the units digit of $n^2$?

So $n^2 \equiv 7 \pmod{100}$? If this is the case then this can be written as $n^2 = 100k +7$, where $k \in \Bbb Z.$
Here one can see that no matter what the choice of $k$, the units digit will be $7$. Thus $n^2 \equiv 7 \pmod{10}.$ However this was wrong. The correct answer is $\textbf{6}.$
What am I doing wrong here? It seems that $n^2 \equiv 7 \pmod{100}$ doesn't hold. If the tens digit is $7$ should I have that $n^2 \equiv 7k \pmod{100}$, where $k$ represents the unit digit of $70$ and not a multiplication?
 [/INST] The tens digit is $7$, not the units and you want to find the unit digit.
So if the unit digit is $x$ then the number ends with $7x$ and $\pmod{100}$ what you are trying to say is $n^2 \equiv 70 + x\pmod {100}$.
The way I would do this is let $n= 10k + a$ where $a,k$ are single digits.  And the hundreds place don't affect the last two digits we might as well assume $n$ has only two digits.
$n^2 = 100k^2 + 20ak + a^2 = 100m + 70 + x$.
As $7$ is odd but $2ak$ is even so $a^2$ must be two digits and we carried an odd digit.  if $a = 0,1,2,3,4,5,6,7,8,9$ then $a^2 = 0,1,4,9,14,25,36,49,64,81$..  So $a = 4$ or $6$.
So if $a = 4$ and $n=10k +4$ then $n^2 = 100k^2 + 80k+ 16$ and if $a=6$ and $n=10k+6$ then $n62 = 100k^2 + 120k + 36$.  In either event $x = 6$.
We can have $8k +1\equiv 7$ and $k = 2,7$ or we can have $2k+3 \equiv 7$ and $k=2,7$.  Notice $24,26,74,76$ when squared all end with $76$.
</s>