You just have to carefully do the algebra to get an inductive argument. The fact that the last digit is 5 is used directly.
Suppose n is a number that ends in 5, and such that the last N digits stay the same when you square it. We want to prove that the last N+1 digits stay the same when you square n^2.
We can write n = m*10^N + p, where p has N digits, and so n^2 = m^2*10^(2N) + 2mp*10^N + p^2. Note that since 2p ends in 0, the term 2mp*10^N actually divides by 10^(N+1). Then since the two larger terms divide by 10^N+1, n^2 agrees with p^2 on its last N+1 digits, and so p^2 agrees with p on at least its last N digits. So we may write p^2 = q*10^N + p. Hence n^2 = m^2*10^(2N) + 2mp*10^N + q*10^N + p.
Squaring this yields (n^2)^2 = (terms dividing by 10^(N+1)) + 2qp*10^N + p^2. Again, 2p ends in 0, so 2qp*10^N also divides by 10^(N+1). So the last N+1 digits of this agree with p^2, which we previously established also agrees with n^2. QED
A similar argument shows that the number generated in this way is the only 10-adic number that ends in 5 and squares to itself. So we also have that one minus this number is the only 10-adic ending in 6 that squares to itself. You can also prove that 0 and 1 are the only numbers ending in 0 and 1 that square to themselves. The other digits can’t square to themselves. So x^2 = x has precisely four solutions.
Note that this works fine in the 10-adics but not in the p-adics for any prime p, because a polynomial over a field can’t have more roots than its degree.
You just have to carefully do the algebra to get an inductive argument. The fact that the last digit is 5 is used directly.
Suppose n is a number that ends in 5, and such that the last N digits stay the same when you square it. We want to prove that the last N+1 digits stay the same when you square n^2.
We can write n = m*10^N + p, where p has N digits, and so n^2 = m^2*10^(2N) + 2mp*10^N + p^2. Note that since 2p ends in 0, the term 2mp*10^N actually divides by 10^(N+1). Then since the two larger terms divide by 10^N+1, n^2 agrees with p^2 on its last N+1 digits, and so p^2 agrees with p on at least its last N digits. So we may write p^2 = q*10^N + p. Hence n^2 = m^2*10^(2N) + 2mp*10^N + q*10^N + p.
Squaring this yields (n^2)^2 = (terms dividing by 10^(N+1)) + 2qp*10^N + p^2. Again, 2p ends in 0, so 2qp*10^N also divides by 10^(N+1). So the last N+1 digits of this agree with p^2, which we previously established also agrees with n^2. QED
A similar argument shows that the number generated in this way is the only 10-adic number that ends in 5 and squares to itself. So we also have that one minus this number is the only 10-adic ending in 6 that squares to itself. You can also prove that 0 and 1 are the only numbers ending in 0 and 1 that square to themselves. The other digits can’t square to themselves. So x^2 = x has precisely four solutions.
Amazing!
BTW, see http://www.numericana.com/answer/p-adic.htm#decimal for solutions to x^3 = x, x^4 = x etc.
Note that this works fine in the 10-adics but not in the p-adics for any prime p, because a polynomial over a field can’t have more roots than its degree.