a-b=2,b-c=4,
(a-b)+(b-c)=2+4
a-c=6;c-a=-6
Let x be the answer,
x=a^2+b^2+c^2-ab-bc-ca
multiply by 2
2x=2(a^2+b^2+c^2-ab-bc-ca)
2x=2a^2+2b^2+2c^2-2ab-2bc-2ca
2x=(a^2-2ab+b^2)+(b^2-2bc+c^2)+(c^2-2ca+a^2)
2x=(a-b)^2+(b-c)^2+(c-a)^2
2x=(2)^2+(4)^2+(-6)^2
2x=56
x=56/2
=28
a^2+b^2+c^2-ab-bc-ca=28