So, I like to factor this sort of problm using synthetic division. First thing's first, let's set up this problem.
color(white)(-2)|1color(white)(000)2color(white)(000)-1color(white)(000)-2
color(white)(-2)|
-2|__________
We bring down the 1, which gives us this:
color(white)(-2)|1color(white)(000)2color(white)(000)-1color(white)(000)-2
color(white)(-2)|
-2|__________
color(white)(0)color(white)(000)1
We then multiply the -2 by the 1 that we brought down to give us -2. That value is brought up to the next row, which brings us to this:
color(white)(-2)|1color(white)(000)2color(white)(000)-1color(white)(000)-2
color(white)(-2)|color(white)(00)-2
-2|__________
color(white)(0)color(white)(000)1
From here, we just add the 2 to the -2 and end up at this:
color(white)(-2)|1color(white)(000)2color(white)(000)-1color(white)(000)-2
color(white)(-2)|color(white)(00)-2
-2|__________
color(white)(0)color(white)(000)1color(white)(000)0
If we continue this system, we end up with this:
color(white)(-2)|1color(white)(000)2color(white)(000)-1color(white)(000)-2
color(white)(-2)|color(white)(00)-2color(white)(0000)0color(white)(000000)2
-2|________
color(white)(0)color(white)(000)1color(white)(000)0color(white)(00)-1color(white)(000000)0
So now we have x=-2 or x+2=0, or (x+2) and (x^2-1). This can be simplified to just (x+1)(x-1).
We now have the factors of x^3+2x^2-x-2, which are (x+2)(x+1)(x-1), which can be rewritten as: x=-2,-1,1.
So let's just double check that we found all the zeros of x^3+2x^2-x-2 be graphing it
graph{x^3+2x^2-x-2}
And look, the three x-intercepts are what we said, x=1,-1,-2.