In the division of a cubic polynomial p(x) by a linear polynomial, the remainder is p(-2).So, the divisor must be
x+2
x+2
The remainder theorem tells us that if a polynomial p(x) is divided by x-a then the remainder is equal to p(a).Here since p(-2) is the remainder, so x-(-2)=x+2 must be the divisor.