I will start by solving for b first:
The third part of your function says that f(x) = 25 for x > 3 and f(x) = bx3 - 2 for x < 3. In order for it to be continuous, both parts have to be equal at x = 3:
25 = bx3 - 2
Plug in x = 3 and solve for b:
25 = b(3)3 - 2
25 =27b - 2
27 = 27b
b = 1
So, now we can plug in b into all three parts of the function:
f(x) = ax2 + x + 4, x < 1
= x3 - 2, 1 < x < 3
= 25, x ≥ 3
In order to find the value of a, the first two parts of f(x) have to be equal at x = 1:
ax2 + x + 4 = x3 - 2
plug in x = 1
a + 1 - 4 = 1 - 2
a - 3 = - 1
a = 2
So, our values are:
a = 2
b = 1