the polynomial remainder theorem states that the remainder of the division of a polynomial f(x) by a linear polynomial x-r is equal to f(r). In particular, x-r is a divisor (= a factor) of f(x), if and only if f(r)=0.
first we are dividing by x - 2.
so, r = 2.
as this is a factor, the remainder must be 0.
so,
0 = f(2) = 2³ + a2² - 15×2 + b = -22 + 4a + b
22 = 4a + b
then we divide by x + 3.
so, r = -3.
and the remainder is 75.
so,
75 = f(-3) = (-3)³ + a×(-3)² - 15×-3 + b = 18 + 9a + b
57 = 9a + b
now we have 2 equations with 2 variables to solve.
and since one term (+b) is the same in both equations, we use a little trick to subtract the first from the second equation.
57 = 9a + b
- 22 = 4a + b
---------------------
35 = 5a + 0
a = 7
22 = 4×7 + b = 28 + b
-6 = b
a = 7
b = -6