Let $X$ be a topological space that admits a countable open cover $\{U_i\}_i$ such that each $U_i$ is second countable in the subspace topology. Show that $X$ is second countable.
My attempted proof is as follows:
For each $i$, $U_i$ admits a countable basis $\mathcal{B}_i$. By the Axiom of Choice, $\cup_i \mathcal{B}_i$ is countable. All of the sets in $\cup_i\mathcal{B}_i$ are open in $X$ since they are of the form $B_i\cap U_i$ for some $B_i\in\mathcal{B}_i$, and both $B_i$ and $U_i$ are open. Since the $\{U_i\}$ are an open cover, for any $x\in X$, $x\in U_i$ for some $i$, so there is $B\in\mathcal{B}_i$ such that $x\in B$.
Now suppose that for any $B_1,B_2\in\cup_i\mathcal{B}_i$, $x\in B_1\cap B_2$. Then there are $i,j$ such that $B_1\in\mathcal{B}_i$ and $B_2\in\mathcal{B}_j$. But I do not understand how to show there is a $B_3\in\cup_i\mathcal{B}_i$ such that $x\in B_3\subset B_1\cap B_2$. How can we show there is such a $B_3$?
I know similar questions have been asked before but I couldn't find the answer to my question.