a) \(2x\left(x+1\right)+2\left(x+1\right)=\left(x+1\right)\left(2x+2\right)=2\left(x+1\right)^2\)
b) \(y^2\left(x^2+y\right)-zx^2-zy=y^2\left(x^2+y\right)-z\left(x^2+y\right)=\left(x^2+y\right)\left(y^2-z\right)\)
c) \(4x\left(x-2y\right)+8y\left(2y-x\right)=4\left(x-2y\right)\left(x-2y\right)=4\left(x-2y\right)^2\)
d) \(3x\left(x+1\right)^2-5x^2\left(x+1\right)+7\left(x+1\right)=\left(x+1\right)\left(3x^2+3x-5x^2+7\right)=\left(x+1\right)\left(-2x^2+3x+7\right)\)