Since you're asked to make h(x) continuous, and not differentiable, it seems to me all you need is to make the three expressions equal to four at x = 1. That makes c = 4 and m = 5.
The first and third expressions are not defined at x = 1, but they will approach 4 as x "goes to 1".