In one of the solutions to the problem of open sets gives this line,
$\overline{X-U} \cap U \subset \overline{(X-U)\cap U}=\emptyset$
$\implies \overline{X-U} \subset X-U$
$\implies X-U \space\text{is closed}$
My question is why is $X-U$ closed? (Note the overline here indicates the closure of the overlined set).
EDIT: Second Question:
If $A$ is a dense subset of $X$ and $U $ is open, then $A\cap U$ is dense in $U$. So in the solution it says, $x\in U \implies x\in X=\overline{A}$, my question is, why is $x \in U$ also, why does $x \in U$ imply that $x \in X?$
The closure is the smallest closed set which contains $X-U$, so if $\overline{X-U} \subset X-U$, then $\overline{X-U} = X-U$ which means that $X-U$ is closed