a) \(a^4+4\)
\(=a^4+4a^2+4-4a^2\)
\(=\left(a^2+2\right)^2+\left(2a\right)^2\)
\(=\left(a^2+2a+2\right)\left(a^2-2a+2\right)\)
b) \(\left(x+y+z\right)^3-x^3-y^3-z^3\)
\(=\left[\left(x+y\right)+z\right]^3-x^3-y^3-z^3\)
\(=\left(x+y\right)^3+z^3+3z\left(x+y\right)\left(x+y+z\right)-x^3-y^3-z^3\)
\(=x^3+y^3+3xy\left(x+y\right)+z^3+3z\left(x+y\right)\left(x+y+z\right)-x^3-y^3-z^3\)
\(=3\left(x+y\right)\left(xy+xz+yz+z^2\right)\)
\(=3\left(x+y\right)\left[x\left(y+z\right)+z\left(y+z\right)\right]\)
\(=3\left(x+y\right)\left(y+z\right)\left(z+x\right)\)