a:\(x^3-1=x^3-3x^2+3x-1+3x^2-3x\)
\(=\left(x-1\right)^3+3x\left(x-1\right)\)
\(=\left(x-1\right)\left(x^2+x+1\right)\)
b: \(x^3+1=x^3+3x^2+3x+1-3x^2-3x\)
\(=\left(x+1\right)^3-3x\left(x+1\right)\)
\(=\left(x+1\right)\left(x^2-x+1\right)\)
d: \(\left(x+y+z\right)^2\)
\(=\left(x+y\right)^2+2z\left(x+y\right)+z^2\)
\(=x^2+2xy+y^2+z^2+2xz+2yz\)