we have that
f(x)=ax^3 --------> interval (-infinite, 2]
f(x)=x^2+b -----> interval (2, infinite)
Remember that
If f is differentiable everywhere
then
the function f must be continuous
so
For x=2
a(2)^3=(2)^2+b
8a=4+b ------> equation 1
Find out the first derivative of each function
f(x)=ax^3 ---------> f'(x)=3ax^2
f(x)=x^2+b --------> f'(x)=2x
For x=2
f'(x)=3ax^2 ------> f'(2)=3a(2)^2=12a
f'(x)=2x ---------> f'(2)=2(2)=4
equate both derivatives
12a=4
a=4/12
a=1/3
substitute in equation 1
8a=4+b
8(1/3)=4+b
b=(8/3)-4
b=-4/3
therefore
a=1/3
b=-4/3