To factor $ xy-6+2y-3x $ we can use factoring by grouping.
Group $ \color{blue}{ xy }$ with $ \color{blue}{ -6 }$ and $ \color{red}{ 2y }$ with $ \color{red}{ -3x }$ then factor each group.
$$ \begin{aligned} xy-6+2y-3x &= ( \color{blue}{ xy+2y } ) + ( \color{red}{ -6-3x }) = \\ &= \color{blue}{ y( x+2 )} \color{red}{ -3( 2+x ) } = \\ &= (y-3)(x+2) \end{aligned} $$