32+42+52+24+40+30 can be written as
32+42+52+(2×3×4)+(2×4×5)+(2×5×3)
Comparing the above equation with the identity
(a+b+c)2=a2+b2+c2+2ab+2bc+2ca,
we get, (3+4+5)2=32+42+52+(2×3×4)+(2×4×5)+(2×5×3).
Hence,
32+42+52+24+40+303+4+5=(3+4+5)2(3+4+5)=(3+4+5)=12