Let X and Y be a topological spaces.

Suppose X is the union of two closed subsets A and B of X .

Let f: A -> Y and g: B-> Y be continuous.

If f(x)=g(x) for every x in the intersection of A and B, then let h: X -> Y be a function defined by setting h(x)=f(x) for x in A, and h(x)=g(x) for x in B.

Then could we say that h is continuous ? Why?