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