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