\(\left(a+b\right)^3+\left(a-b\right)^3=\left[\left(a+b\right)\left(a^2-ab+b^2\right)\right]+\left[\left(a-b\right)\left(a^2+ab+b^2\right)\right]\)
\(=\left(a^3-a^2b+b^2a+a^2b-ab^2+b^3\right)+\left(a^3+a^2b+ab^2-ba^2-ab^2-b^3\right)\)
\(=a^3-a^2b+b^2a+a^2b-ab^2+b^3+a^3+a^2b+ab^2-ba^2-ab^2-b^3\)
\(=2a^3\)
$(a+b)^3+(a-b)^3 \\=(a+b+a-b)[(a+b)^2-(a+b)(a-b)+(a-b)^2] \\=2a(a^2+2ab+b^2-a^2+b^2+a^2-2ab+b^2) \\= 2a(a^2+3b^2)$