$X$ compact Hausdorff with $X=X_1\cup X_2$. If $X_1,X_2$ are closed and metrizable, show that $X$ is metrizable. This is Exercise 9 from Section 34 of Munkres - Topology.  Following the hint given, I've done the following:Since $X$ is compact, $X_1,X_2$ are compact metrizable and hence have countable bases.  Let $\mathscr B_1$,$\mathscr B_2$ be countable collections of open sets in $X$ such that $\{B\cap X_1:B\in\mathscr B_1\},\{B\cap X_2:B\in\mathscr B_2\}$ are bases for $X_1,X_2$ respectively.  Now let 
$$\mathscr A=\{X_1\setminus X_2,X_2\setminus X_1\}\cup\mathscr B_1\cup\mathscr B_2.$$
The idea, as suggested by the hint, is to show that $\mathscr A$ is a subbasis for the topology on $X$.
Let $U\subseteq X$ be open, and $x\in U$. If $x\in U\cap(X_1\setminus X_2)$, then there is a $B\in\mathscr B_1$ such that $x\in U\cap B\cap(X_1\setminus X_2)$.  For $x\in U\cap(X_2\setminus X_1)$ there is a $B\in\mathscr B_2$ with $x\in U\cap B\cap (X_2\setminus X_1)$.
I'm stuck when $x\in U\cap X_1\cap X_2$.  Picking $B_1\in\mathscr B_1,B_2\in\mathscr B_2$ such that $B_1\cap X_1\subseteq U\cap X_1$ and $B_2\cap X_2\subseteq U\cap X_2$, does not guarantee that $B_1\cap B_2\subseteq U$.
 A: Use the fact that $X = X_1 \cup X_2$.  Take $y \in B_1 \cap B_2$. Then $y \in X_i$ for some $i \in \{1,2\}$. But then $y \in B_i \cap X_i \subseteq U \cap X_i \subseteq U$. So in fact $B_1 \cap B_2 \subseteq U$.
A: Not an answer to the question that appeared in your proof, but a different attempt.
Since $X_i$ are closed, they are compact. Being metrizable, they are both separable. So their union $X$ is separable. Alas, that may not be enough: there exist compact separable spaces that are not metrizable. 
Now, both $X_1$ and $X_2$ are metrizable, so have countable basis.  So their disjoint union $X_1 \sqcup X_2$ has countable basis, and so is a compact metrizable space. Now $X = X_1 \cup X_2$ is an image of $X_1 \sqcup X_2$. Now it is the case that an image of a compact metrizable space is compact metrizable. This follows from the fact that $X$ is metrizable if and only if $C(X)$ is separable. If $Y\to X$ is surjective (both compact) then $C(X) \subset C(Y)$. If $Y$ is metrizable then $C(Y)$ is separable, so $C(X)$ is separable and so $X$ is metrizable. 
