How do you write x^2-8x-xy+8y in factored form?

It is ${x}^{2} - 8 x - x y + 8 y = \left({x}^{2} - x y\right) - 8 \left(x - y\right) = x \left(x - y\right) - 8 \left(x - y\right) = \left(x - 8\right) \left(x - y\right)$