1. \(\left(a+b\right)^3-3ab\left(a+b\right)\)
\(=a^3+3a^2b+3ab^2+b^3-3a^2b-3ab^2\)
\(=a^3+b^3\)
2. \(\left(a-b\right)^3+3ab\left(a-b\right)\)
\(=a^3-3a^2b+3ab^2-b^3+3a^2b-3ab^2\)
\(=a^3-b^3\)
3. \(\left(x+2\right)^3+\left(x-2\right)^3-2x\left(x^2+12\right)\)
\(=x^3+3x^22+3x2^2+2^3+x^3-3x^22+3x2^2-2^3-2x^3-24x\)
\(=x^3+6x^2+12x+8+x^3-6x^2+12x-8-2x^3-24x\)
\(=\left(x^3+x^3\right)-2x^3+\left(6x^2-6x^2\right)+\left(12x+12x\right)-24x+\left(8-8\right)\)\(=0\)
4. \(\left(x-1\right)^3-\left(x+1\right)^3+6\left(x+1\right)\left(x-1\right)\)
\(=\left(x^3-3x^2+3x-1\right)-\left(x^3+3x^2+3x+1\right)+\left(6x+1\right)\left(x-1\right)\)\(=x^3-3x^2+3x-1-x^3-3x^2-3x-1+6x^2-6\)
\(=\left(x^3-x^3\right)+\left(-3x^2-3x^2\right)+6x^2+\left(3x-3x\right)-1-1-6\)\(=-8\)