A stationary point at x = 3 means the derivative dy/dx = 0 at that point. Differentiating, we have
dy/dx = 6x ² + 2ax + b
and so when x = 3,
0 = 54 + 6a + b
or
6a + b = -54 … … … [eq1]
The curve passes through the point (4, 2), which is to say y = 2 when x = 4. So we also have
2 = 128 + 16a + 4b - 30
or
16a + 4b = -96
4a + b = -24 … … … [eq2]
Eliminate b by subtracting [eq2] from [eq1] and solve for a, then for b :
(6a + b) - (4a + b) = -54 - (-24)
2a = -30
a = -15 ===> b = 96