Let $(X,\mathcal{T})$ be a topological space. Show that if $(X, \mathcal{T})$ has countable base, it is separable (a) and Lindelöf (b)
My attempt:
Let $\mathcal{B}$ be a countable basis of the given topology.
(a) For every $B \in \mathcal{B}\setminus\{\emptyset\}$, choose $x_B \in B$ (here we use AC) and consider $D:= \{x_B \mid B \in \mathcal{B}\}$. It is clear that this is at most countable. Let $x \in X$ and $V \in \mathcal{V(x)}$. Then, there exists $G \in \mathcal{T}$ such that $x \in G \subseteq V$. But, there exists $\mathcal{A} \subseteq \mathcal{B}$ such that $G = \bigcup\mathcal{A}$, since $\mathcal{B}$ is a basis. Take $A \in \mathcal{A}$ with $x \in A \in \mathcal{B}$. Then $A$ is non empty, and hence $x_A \in A \cap D \subseteq V \cap D$, so $x \in \overline{D}$ and hence $D$ is dense in $X$.
(b) Let $\mathcal{G}$ be an open cover of $X$.
For every $G$ in this cover, there exists $\mathcal{A}_G \subseteq \mathcal{B}$ such that $G= \bigcup \mathcal{A_G}$. Consider the collection $\mathcal{C}:= \bigcup_{G \in \mathcal{G}}\mathcal{A}_G \subseteq \mathcal{B}$.
If $C \in \mathcal{C}$, then there is $G_C \in \mathcal{G}$ such that $C \in \mathcal{A}_{G_C}$. Thus, $C \subseteq G_C$. Consider the countable set ($\mathcal{C}$ countable because $\mathcal{B}$ countable)
$$\{G_C \mid C \in \mathcal{C}\}$$
Then:
$$X \supseteq\bigcup_{C \in \mathcal{C}}G_C \supseteq \bigcup_{C \in \mathcal{C}} C = \bigcup_{G \in \mathcal{G}} \bigcup_{H \in \mathcal{A}_G}H = \bigcup_{G \in \mathcal{G}} \bigcup\mathcal{A}_G = \bigcup_{G \in \mathcal{G}}G = \bigcup\mathcal{G} = X$$
Hence, $\{G_C \mid C \in \mathcal{C}\}$ is a countable subcover of $\mathcal{G}$, and hence $X$ is Lindelöf.
Is this correct?