Remark
x - 1 is a root.
Proof
x - 1 = 0
x = 1
(1)^3 + 5(1)^2 - 8(1)^2 - 40(1) + 7(1) + 35
1 + 5 - 8 - 40 + 7 + 35
6 + 7 + 35 - 48 = 0
Solution
Divide x - 1 into the original equation.
x^3 + 5x^2 - 8x^2 - 33x + 35
x - 1 || x^3 - 3x^2 - 33x + 35 || x^2 - 2x - 35
x^3 - x^2
-2x^2 - 33x
-2x^2 + 2x
- 35x + 35
-35x + 35
0
x^2 - 2x - 35 factors into (x - 7)(x + 5)
Complete factorization
(x - 1)(x - 7)(x + 5)