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