I need some help with this problem (please don't give me the answer though, just hint me)

suppose the function g is defined by

k sqrt(X+1) for 0<(including) x<(including) 3

g(X)=<

mX+2 for 3<x<(including) 5

where k and m are constants. if g is differentiable at x=3, what are the values of k and m.

Im not sure how to do this. But to start I tried solving the the two pieces of the function and got

g(X)= 2k & g(X)=3m+2

Please Help