Step 1 :
To factor $ f^{3}+2f^{2}-64f-128 $ we can use factoring by grouping:
Group $ \color{blue}{ x^{3} }$ with $ \color{blue}{ 2x^{2} }$ and $ \color{red}{ -64x }$ with $ \color{red}{ -128 }$ then factor each group.
$$ \begin{aligned} f^{3}+2f^{2}-64f-128 = ( \color{blue}{ x^{3}+2x^{2} } ) + ( \color{red}{ -64x-128 }) &= \\ &= \color{blue}{ x^{2}( x+2 )} + \color{red}{ -64( x+2 ) } = \\ &= (x^{2}-64)(x+2) \end{aligned} $$Step 2 :
Rewrite $ f^{2}-64 $ as:
$$ f^{2}-64 = (f)^2 - (8)^2 $$Now we can apply the difference of squares formula.
$$ I^2 - II^2 = (I - II)(I + II) $$After putting $ I = f $ and $ II = 8 $ , we have:
$$ f^{2}-64 = (f)^2 - (8)^2 = ( f-8 ) ( f+8 ) $$