First, in order for it to be differentiable, it must be continuous at that point.
So you want to see where .
Then. For it to be differentiable at that point, the slopes of the two piecewise functions must be the same at that point. This means that
You will then be able to come up with a system of equations. Now you can solve it for a.
Does this make sense? Can you take it from here?