a+b=3,ab=-2
a^3+a^2b+ab^2+b^3
=ab(a+b)+(a+b)(a^2-ab+b^2)
=(a+b)(ab+a^2-ab+b^2)
=(a+b)(a^2+b^2)
=(a+b)[(a+b)^2-2ab]
=3*[3*3-2*(-2)]
=3*13
=39
a+b=3,ab=-2
a^3+a^2b+ab^2+b^3
=ab(a+b)+(a+b)(a^2-ab+b^2)
=(a+b)(ab+a^2-ab+b^2)
=(a+b)(a^2+b^2)
=(a+b)[(a+b)^2-2ab]
=3*[3*3-2*(-2)]
=3*13
=39