.
Local minimum and local maximum x-values are the roots of the derivative
f'(x) = 0 = 3ax^2 + 12x + b (1)
So, you have this system of two equations for two unknowns "a" and "b"
f'(-1) = 3a*(-1)^2 + 12*(-1) + b = 0 (2)
f'(2) = 3a*2^2 + 12*2 + b = 0 (3)
or
3a + b = 12 (4)
12a + b = -24. (5)
Subtract equation (4) from equation (5) to get
9a = - 36, a = -36/9 = -4.
Then from equation (4),
3*(-4) + b = 12, b = 12 + 12 = 24.
ANSWER. a = -4, b = 24.
Visual check
Plot y = .
Done.
/\/\/\/\/\/\/
I do not understand, for what need/reason tutor @greenestamps re-told my solution in his post.
It did not become more clear after that.
In any case, thanks for popularizing my solution (!)