text{ -------------------------}
x -1 quad text{)} quad x^3 + 3x^2 - 3x - 2
That's a pain to format. Anyway, the first "digit", first term in the quotient, is x^2. We compute the digit times x-1, and take that away from x^3 + 3x^2 - 3x -2 :
text{ } x^2
text{ -------------------------}
x -1 quad text{)} quad x^3 + 3x^2 - 3x - 2
text{ } x^3 -x^2
text{ ----------------}
text{ } 4 x^2 - 3x - 2
OK, back to the quotient. The next term is 4x because that times x gives 4 x^2. After that the term is 1.
text{ } x^2 + 4 x + 1
text{ -------------------------
x -1 quad text{)} quad x^3 + 3x^2 - 3x - 2
text{ } x^3 -x^2
text{ ----------------}
text{ } 4 x^2 - 3x - 2
text{ } 4 x^2 - 4x
text{ ----------------}
text{ } x - 2
text{ } x - 1
text{ --------}
text{ } -1
We have a non-zero remainder! That says
x^3 + 3x^2 - 3x - 2 = ( x -1)(x^2 + 4x + 1) - 1