For a set $\mathcal{B}$ to be a basis for a topological space $\left( X, O \right)$, we require the following:
- The union of all elements of $\mathcal{B}$ should be all of $X$.
- Given elements $B_1, B_2 \in \mathcal{B}$ with $x \in B_1 \cap B_2$, we should be able to find $B \in \mathcal{B}$ such that $x \in B \subseteq B_1 \cap B_2$.
It is clear as to why the union of all elements of $\bigcup\limits_{x \in X} B_x$ is all of $X$. Particularly, it is true because each $x \in X$ is contained in every element of $B_x$ and hence together they all cover $X$.
For the second part, we notice that a local base is made of open sets. Therefore, both $B_1$ and $B_2$ are open, and each contains $x$. Using he properties of base, we can find $B_1', B_2' \in B_x$ such that $x \in B_1' \subseteq B_1$ and $x \in B_2' \subseteq B_2$. Consequently, since now both $B_1', B_2' \in B_x$, there is an element $B \in B_x$ such that $x \in B_1' \cap B_2' \subseteq B_1 \cap B_2$.
This tells us that the union of all local bases is indeed a base for the topology.