\(\left(x+2\right)^3-x.\left(x+2\right).\left(x-2\right)+6x^2\)
\(=x^3+3x^2.2+3x.2^2+2^3-x.\left(x^2-2^2\right)+6x^2\)
\(=x^3+6x^2+12x+8-\left(x^2-4\right)+6x^2\)
\(=x^3+6x^2+12x+8-x^3+4x+6x^2\)
\(=\left(x^3-x^3\right)+\left(6x^2+6x^2\right)+\left(12x+4x\right)+8\)
\(=12x^2+16x+8\)