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