(a+b)^3
=(a+b)(a+b)(a+b)
=(a+b)(a^2+2ab+b^2)
=a^3+3a^2b+3ab^2+b^3
(a-b)^3
=(a-b)(a-b)(a-b)
=(a-b)(a^2-2ab+b^2)
= a^3-3a^2b+3ab^2-b^3
(a+b)^3
=(a+b)(a+b)(a+b)
=(a+b)(a^2+2ab+b^2)
=a^3+3a^2b+3ab^2+b^3
(a-b)^3
=(a-b)(a-b)(a-b)
=(a-b)(a^2-2ab+b^2)
= a^3-3a^2b+3ab^2-b^3