\(x^2-2xy+y^2-x+y\\ =\left(x^2-2xy+y^2\right)-\left(x-y\right)\\ =\left(x-y\right)^2-\left(x-y\right)\\ =\left(x-y\right)\left(x-y-1\right)\)
x2−2xy+y2−x+y=(x2−2xy+y2)−(x−y)=(x−y)2−(x−y)=(x−y)(x−y−1)
\(x^2-2xy+y^2-x+y\)
\(=\left(x^2-2xy+y^2\right)+\left(-x+y\right)\)
\(=\left(x^2-2xy+y^2\right)-\left(x-y\right)\)
\(=\left(x-y\right)^2-\left(x-y\right)\)
\(=\left(x-y\right)\left[\left(x-y\right)-1\right]\)
\(=\left(x-y\right)\left(x-y-1\right)\)