\(x^2-xy+x-y.\)
\(=\left(x^2-xy\right)+\left(x-y\right)\)
\(=x.\left(x-y\right)+\left(x-y\right)\)
\(=\left(x-y\right).\left(x+1\right)\)
\(x^2-xy+x-y\)
\(=\left(x^2+x\right)-\left(xy+y\right)\)
\(=x\left(x+1\right)-y\left(x+1\right)\)
\(=\left(x-y\right)\left(x+1\right)\)
x(x-y)+(x+y)
=(x+y)(x+1)