Answer:
q = -3.
Explanation:
By the Remainder Theorem:
Remainder when dividing by x + 2 = g(-2) and
the remainder when dividing by x - 1 = g(1) .
So g(-2) = g(1) .
That is:
2(-2)^3 + 3(-2)^2 - 2q - 1 = 2(1)^3 + 3(1)^2 + q - 1
-16 + 12 - 2q - 1 = 2 + 3 + q - 1
-2q - q = 5 + 2 + 3 - 1
-3q = 9
q = -3.