If $A - B$ is divisible by $10^n$, and $A$ and $B$ share a common last digit of $5$, then $A^2 - B^2 = (A + B)(A - B)$ is divisible by $10^{n + 1}$ (as $A + B$ is divisible by $10$). In other words, if $A$ and $B$ have the same last $n$ many digits, and share a common last digit of 5, then $A^2$ and $B^2$ have the same last $n + 1$ many digits. From this it inductively follows that in the sequence of values $5, 5^2 = 25, 25^2 = 625, \ldots$, where each value is the square of the previous one, the last $n$ digits stabilize from the $n$th element onwards (with $5$ as the $1$st element), yielding a 10-adic number which is its own square.