p(x)=x^3-x^2-3x+1
since a,b,c are roots of p(x).. then p(a)=0, p(b)=0, p(c)=0
a^3-a^2-3a+1=0-------------->(1)
b^3-b^2-3b+1=0-------------->(2)
c^3-c^2-3c+1=0--------------->(3)
(1)+(2)+(3)=a^3+b^3+c^3-(a^2+b^2+c^2)-3(a+b+c)+3=0
u can get a^2+b^2+c^2=... from sum of roots a+b+c=...