The function is given as

We have to make sure that function is differentiable everywhere for that the function is continuous everywhere .
So for the piecewise continuous function given check the continuity at x=0.


For function to be continuous, b=8.
Now for the two functions first derivative has the same value wen x=0.


Now for these have the same value.

Hence the value of b is 8 and a is 0.