To factor $ 5w^{3}+7w^{2}+30w+42 $ we can use factoring by grouping:
Group $ \color{blue}{ 5x^{3} }$ with $ \color{blue}{ 7x^{2} }$ and $ \color{red}{ 30x }$ with $ \color{red}{ 42 }$ then factor each group.
$$ \begin{aligned} 5w^{3}+7w^{2}+30w+42 = ( \color{blue}{ 5x^{3}+7x^{2} } ) + ( \color{red}{ 30x+42 }) &= \\ &= \color{blue}{ x^{2}( 5x+7 )} + \color{red}{ 6( 5x+7 ) } = \\ &= (x^{2}+6)(5x+7) \end{aligned} $$