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