Consider $2x-x^{2}+2-x$. Multiply and combine like terms.
$$-x^{2}+x+2$$
Consider $-x^{2}+x+2$. Factor the expression by grouping. First, the expression needs to be rewritten as $-x^{2}+px+qx+2$. To find $p$ and $q$, set up a system to be solved.
$$p+q=1$$ $$pq=-2=-2$$
Since $pq$ is negative, $p$ and $q$ have the opposite signs. Since $p+q$ is positive, the positive number has greater absolute value than the negative. The only such pair is the system solution.
$$p=2$$ $$q=-1$$
Rewrite $-x^{2}+x+2$ as $\left(-x^{2}+2x\right)+\left(-x+2\right)$.
$$\left(-x^{2}+2x\right)+\left(-x+2\right)$$
Factor out $-x$ in the first and $-1$ in the second group.
$$-x\left(x-2\right)-\left(x-2\right)$$
Factor out common term $x-2$ by using distributive property.