(a+b+c)(a^2+b^2+c^2-ab-ac-bc)+3ab=

(a+b+c)(a^2+b^2+c^2-ab-ac-bc)+3ab=

(a+b+c)(a^2+b^2+c^2-ab-ac-bc)+3ab
=a^3+b^3+c^3-3abc+3ab
Your formula should be followed by 3ABC, so the result is a ^ 3 + B ^ 3 + C ^ 3