a: =(x+y)^3+z^3-3xy(x+y)-3xyz
\(=\left(x+y+z\right)\left[\left(x+y\right)^2-z\left(x+y\right)+z^2\right]-3xy\left(x+y+z\right)\)
\(=\left(x+y+z\right)\left(x^2+2xy+y^2-xz-yz+z^2-3xy\right)\)
\(=\left(x+y+z\right)\left(x^2+y^2+z^2-xy-xz-yz\right)\)
b: \(=\left(x+y+y-z\right)^3-3\left(x+y\right)\left(y-z\right)\left(x+y+y-z\right)+\left(z-x\right)^3\)
\(=\left(x-z\right)^3+\left(z-x\right)^3-3\left(x+y\right)\left(y-z\right)\left(x-z\right)\)
\(=-3\left(x+y\right)\left(y-z\right)\left(x-z\right)\)
c: \(=\left(x^2+x\right)^2+3\left(x^2+x\right)+2-12\)
\(=\left(x^2+x\right)^2+3\left(x^2+x\right)-10\)
=(x^2+x+5)(x^2+x-2)
=(x^2+x+5)(x+2)(x-1)
d: =b^2c+bc^2+ac^2-a^2c-a^2b-ab^2
=b^2c-b^2a+bc^2-a^2b+ac^2-a^2c
=b^2(c-a)+b(c^2-a^2)+ac(c-a)
=(c-a)(b^2+ac)+b(c-a)(c+a)
=(c-a)(b^2+ac+bc+ba)
=(c-a)[b^2+bc+ac+ab]
=(c-a)[b(b+c)+a(b+c)]
=(c-a)(b+c)(b+a)