Let a 3-digits number be abc, the value = 100a+10b+c,
(100a+10b+c)^2
= 10000a^2 + (10b+c)^2 + 2(100a)(10b+c)
= 10000a^2 + 100b^2 + c^2 + 20bc + 2000ab + 200ac
e.g. simpify 123^2,
Let a=1,b=2,b=3 and the answer
= 10000 + 400 + 9 + 120 + 4000 + 600
= 15129