Show that $X$ have a countable base. I'm trying to make the issue of Munkres question 34.9, which in turn boils down to finding a countable base for $X$.
Being $X_1$ and $X_2$ closed subspaces of $X$ who have countable base $\{B_i \cap X_1\}_{i \in \mathbb{N}}$, $\{C_j \cap X_2\}_{j \in \mathbb{N}}$ respectively. I can take the base $X$ the collection $D$ of the elements $B_i, \ i \in \mathbb{N}$ with the elements $C_j, \ j \in \mathbb{N}$? Why then the hint? Thanks!
Question: Let $X$ be a compact Hausforff space that is the union of the closed subspaces $X_1$ and $X_2$. If $X_1$ and $X_2$ are metrizable, show that $X$ is metrizable. Hint: Consturct a countable collection $A$ of open sets of $X$ whose intersections with $X_i$ form a basis for $X_i$, for $i=1,2$. Assume $X_1-X_2$ and $X_2-X_1$ belong to $A$. Let $B$ consist of finite intersections of elements of $A$.
 A: The $\{B_k:k\in\Bbb N\}\cup\{C_k:k\in\Bbb N\}$ need not be a base for $X$. Suppose, for instance, that $X=(0,2)$ with the usual topology, $X_1=(0,1]$, and $X_2=[1,2)$. Let 
$$\mathscr{B}=\{(p,q):p,q\in\Bbb Q\text{ and }0<p<q\le 1\}\cup\{(p,2):p\in\Bbb Q\text{ and }0<p<1\}$$ and
$$\mathscr{C}=\{(p,q):p,q\in\Bbb Q\text{ and }1\le p<q<2\}\cup\{(0,p):p\in\Bbb Q\text{ and }1<p<2\}\;;$$
then $\mathscr{B}$ and $\mathscr{C}$ are countable, $\{X_1\cap B:B\in\mathscr{B}\}$ is a base for $X_1$, and $\{X_2\cap C:C\in\mathscr{C}\}$ is a base for $X_2$. $\mathscr{B}\cup\mathscr{C}$ is not a base for $X$, however, because it does not contain a local base at $1$: for example, there is no $U\in\mathscr{B}\cup\mathscr{C}$ such that $1\in U\subseteq\left(\frac12,\frac32\right)$, as there would have to be if $\mathscr{B}\cup\mathscr{C}$ were a base for $X$. If we included finite intersections of members of $\mathscr{B}\cup\mathscr{C}$, however, we would have a base: for any rationals $p\in(0,1)$ and $q\in(1,2)$ we have $(p,2)\in\mathscr{B}$ and $(0,q)\in\mathscr{C}$, and their intersection is $(p,q)$.
It isn’t always quite enough to take finite intersections of members of $\mathscr{B}\cup\mathscr{C}$, but the hint suggests that we don’t need much more than that. 
To use the hint, note that $X_1\setminus X_2=X\setminus X_2$ and $X_2\setminus X_1=X\setminus X_1$, since $X_1\cup X_2=X$. Thus, $X_1\setminus X_2$ and $X_2\setminus X_1$ are open in $X$. Let $\mathscr{B}$ be a countable family of open sets in $X$ such that $\{X_1\cap B:B\in\mathscr{B}\}$ is a base for $X_1$, and let $\mathscr{C}$ be a countable family of open sets in $X$ such that $\{X_2\cap C:C\in\mathscr{C}\}$ is a base for $X_2$. Let $$\mathscr{A}=\mathscr{B}\cup\mathscr{C}\cup\{X_1\setminus X_2,X_2\setminus X_1\}\;;$$ clearly $\mathscr{A}$ is a countable family of open sets in $X$. Now let $$\mathscr{U}=\left\{\bigcap\mathscr{F}:\mathscr{F}\text{ is a finite subset of }\mathscr{A}\right\}\;.$$ 


*

*Show that $\mathscr{U}$ is countable.  

*Show that $\mathscr{U}$ is a base for $X$.

