x2 - 2xy + x + 3xz - 2y + 3z
= x2 - 2xy + x - 2y + 3xz + 3z
= x ( x - 2y ) + ( x - 2y ) + 3z( x + 1 )
= ( x - 2y ) ( x + 1 ) + 3z ( x + 1 )
= ( x + 1 ) ( x - 2y + 3z )
\(x^2-2xy+x+3xz-2y+3z\)
\(=\left(x^2+x\right)+\left(-2xy-2y\right)+\left(3xz+3z\right)\)
\(=x\left(x+1\right)-2y\left(x+1\right)+3z\left(x+1\right)\)
\(=\left(x+1\right)\left(x-2y+3z\right)\)