given intervals are [a,b] and [b,c].
suppose d is any point such that a < d < b, then h(d ) = f(d) and since f is continuous at every d in [ a, b] , we get h is continuous on [a ,b). -------------(1)

and

.
further , given f(b) = g(b).
so,

.
so, h is continuous at b. --------------(2)
suppose d is in (b, c ].
then by hypothesis , we have

also, g is continuous on [b, c ] ==> h is continuous on ( b , c]. -------------(3)
(1) , (2) , ( 3) ==> h is continuous on [a , c].