a^3+a^2c-abc+b^2c+b^3
=a^3+b^3+(a^2c-abc+b^2c)
=a^3+b^3+c*(a^2-ab+b^2)
=(a+b)(a^2-ab+b^2)+c*(a^2-ab+b^2)
=(a+b+c)(a^2-ab+b^2)
=0
a^3+a^2c-abc+b^2c+b^3
=a^3+b^3+(a^2c-abc+b^2c)
=a^3+b^3+c*(a^2-ab+b^2)
=(a+b)(a^2-ab+b^2)+c*(a^2-ab+b^2)
=(a+b+c)(a^2-ab+b^2)
=0