xy^2 - zy^2 - zy + xy - x + z = xy^2 - z(y^2 + y) + xy - x + z= xy(y - z) - z(y + 1) + (x - z)= (xy - z)(y + 1) + (x - z)= (xy - z)(y + 1) + (x - z)
xy^2 - zy^2 - zy + xy - x + z = xy^2 - z(y^2 + y) + xy - x + z
= xy(y - z) - z(y + 1) + (x - z)
= (xy - z)(y + 1) + (x - z)
= (xy - z)(y + 1) + (x - z)