Let $(X, \tau )$ a topological space and $D$ a dense subset. Prove that if $x\in D$ and $U$ is a neighborhood of $x$ in $D$ (for the subspace topology) then the closure of $U$ in $X$ is a neighborhood of $x$ in $X$.
My attempt is the following:
I want to show that $\overline{U}$ contains an open neighborhood of x in X.
Let $U$ a neighborhood of $x$ in $D$. Then, exists $U'$ open in $D$ such that $U'\subseteq U$. By definition of subspace topology, exists $V$ an open set in $X$ such that $x\in V$ and $U'=V\cap D$.
I obtain that $V\cap D=U'\subseteq \overline{U'}^X=\overline{V\cap D}^X=\overline{V}^X\cap \overline{D}^X=\overline{V}^X\cap X=\overline{V}^X$.
So, $U'\subseteq U \Longrightarrow V\subseteq \overline{V}^X=\overline{U'}^X\subseteq \overline{U}^X$.