The question is:
x3+3x2-2x+7
x+1
taking common
X(x2+3x-2)+7
x+1
making factors
X(x2+2x+x+2)+7
x+1
taking common
X(x(x+2)+1(x+2)+7
x+1
So
X(X+2)(x+1)+7
(x+1)
(x+1) in the denominator cancels with the (x+1) in the numerator. So
X(X+2)+7
Which when expanded:
x2+2x+7
x3+3x2-2x+7
x+1
taking common
X(x2+3x-2)+7
x+1
making factors
X(x2+2x+x+2)+7
x+1
taking common
X(x(x+2)+1(x+2)+7
x+1
So
X(X+2)(x+1)+7
(x+1)
(x+1) in the denominator cancels with the (x+1) in the numerator. So
X(X+2)+7
Which when expanded:
x2+2x+7