I believe there is something wrong with the problem statement.

Consider the segments A--> B and B--> C. You state that the functions for the two segments must be equal at point B AND the derivatives of the functions must be equal at point B. Setting the derivatives equal, gives a=0.01 and b = -1.2, which does not result in the functions being equal.