a) \(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+1\right)\left(x-y\right)\)
b) \(3x^2-3xy-5x+5y=\left(3x^2-3xy\right)-\left(5x-5y\right)\)
\(=3x\left(x-y\right)-5\left(x-y\right)=\left(3x-5\right)\left(x-y\right)\)