Let X = n5 be a number of two digits: n between 1 to 9 and 5 (i.e. if x = 65 then n = 6). SO: n5^2 = (n * 10 + 5) = 100*n^2 + 100*n + 25 = 100*(n^2 + n) + 25. But n^2 + n = n(n+1) and it's easy to see that (n^2+n) is exactly the two first digits (because *100).