\(a,=2x\left(x-4\right)\\ b,=x\left(x-y\right)+\left(x-y\right)\\ =\left(x+1\right)\left(x-y\right)\)
\(a.2x^2-8x=2x\cdot x-2\cdot4x=2x\left(x-4\right).\)
\(b.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).\)