Formula use:
a^3-b^3=\left(a-b\right)\left(a^2+ab+b^2\right)
Explanation
Given expression is: 8\left(x+y\right)^3-z^3
Factorize
8\left(x+y\right)^3-z^3
\rightarrow\{2\left(x+y\right)\}^3-z^3
\rightarrow\left(2x+2y\right)^3-z^3
\rightarrow\{\left(2x+2y\right)-z\}\{\left(2x+2y\right)^2+\left(2x+2y\right).z+z^2\}
\therefore\left(2x+2y-z\right)\left(4x^2+8xy+4y^2+2xz+2yz+z^2\right)
Ans: \left(2x+2y-z\right)\left(4x^2+8xy+4y^2+2xz+2yz+z^2\right)