The equation is given as. x3+qx+r=0 The roots of the given equation is. a+b+c=0 ab+bc+ca=q abc=−r Squaring the root of the equation. (a+b+c)2=0 a2+b2+c2+2ab+2bc+2ca=0 a2+b2+c2+2(ab+bc+ca)=0 Substituting the values we get, a2+b2+c2=−2q Now, (a−b)2+(b−c)2+(c−a)2 =a2+b2−2ab+b2+c2−2bc+c2+a2−2ac =2(a2+b2+c2)−2(ab+bc+ca) =9(−2q)−2(q) =−6q