Consider $x^{2}-x+y^{2}-xy^{2}$. Do the grouping $x^{2}-x+y^{2}-xy^{2}=\left(x^{2}-x\right)+\left(y^{2}-xy^{2}\right)$, and factor out $x$ in the first and $-y^{2}$ in the second group.
$$x\left(x-1\right)-y^{2}\left(x-1\right)$$
Factor out common term $x-1$ by using distributive property.