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