Pasting Lemma

Theorem
Let $X$ and $Y$ be topological spaces.

Let $A$ and $B$ be open in $X$.

Let $f: A \to Y$ and $g: B \to Y$ be continuous mappings that agree on $A \cap B$.

Then the mapping $f \cup g : A \cup B \to Y$ is continuous.