This is Exercise 4 from Section 2.2 of Topology and Groupoids by Brown.
Exercise:
Let $X$ be a topological space and let $A \subseteq B \subseteq X$. We say that $A$ is dense in $B$ if $B \subseteq \overline A$, and $A$ is dense if $\overline A = X$. Prove that if $A$ is dense in $X$ and $U$ is open then $U \subseteq \overline{A \cap U}$.
More information:
The definition of the overline/bar notation:
Let $X$ be a topological space and let $A \subseteq X$. The closure of $A$ is the set $\overline A$ of points $x$ in $X$ such that every neighborhood of $x$ intersects $A$.
My attempt:
Consider $x \in U$. We want to show that every neighborhood of $x$ intersects $A \cap U$. Clearly every neighborhood of $x$ intersects $U$, so we just have to show that every neighborhood of $x$ intersects $A$. Since $A$ is dense in $X$, we know that $X \subseteq \overline A$, which can only mean that $\overline A = X$. Since $x \in X$, we see that every neighborhood of $x$ does intersect $A$, which concludes the proof.
My concern:
I didn't make any use of the assumption that $U$ is open, which makes me wonder if I screwed up somewhere.
I appreciate any feedback.