This two-liner proof actually means quite a bit. I am pasting the whole proof from my notes.
In this theorem, we analyze a metric space $X$ with its [non-empty] subsets, $Y, E$.
Abstract
Proof in two parts, forward and reverse directions. Forward direction presents a direct proof by construction, reverse direction is a proof by contradiction.
Forward direction
$Y \in X$. $E \subset Y$, $E$ is open relative to $Y$. We have to prove there exists an open set $G \subset X$ such that $E = Y \cap G$.
We explicitly construct such a set by doing the following.
Since $E$ is open to $Y$, then for each point $p \in E$ there exists $r > 0$ and $\mathcal{N}(p)$ such that all points of $E$ in this neighborhood are points of $E$. So we take a union of all such neighborhoods,
$$ G = \bigcup_{p \in E} \mathcal{N}(p) $$
$G$ is open since a union of open sets is open (Rudin 2.24a).
$G$ contains all points of $p \in E$, so $E \subset G$. Since by assumption $E \subset Y$, we have
$$ E = G \cap Y \quad \text{as required.} $$
Reverse direction
Again, we have a metric space $X$, with $E \subset Y$, $Y \subset X$. For this $E$ there exists an open set $G \subset X$ such that
$$ E = Y \cap G \quad (1) $$
We have to prove $E$ is open relative to $Y$. That is, for all $p \in E$ there exists $r>0$ such that
$$ \underbrace{d(p,q) < r \quad \text{for all $q \in Y$ } }_\text{call this 'P'} \quad \text{implies} \quad \underbrace{q \in E}_\text{call this 'Q'} $$
We prove by contradiction. Suppose the assumptions are true, but $E$ is not open relative to $Y$. The logical structure of such statement is this
\begin{align} &\text{Not}(\forall p \in E : \exists r > 0 : \text{P implies Q}) = \nonumber \\ &\exists p \in E : \text{Not}(\exists r : \text{P implies Q}) = \nonumber \\ &\exists p \in E : \forall r : \text{Not}(\text{P implies Q}) = \nonumber \\ &\exists p \in E : \forall r : (\neg Q \text{ and } P) = \nonumber \\ &\underbrace{ \exists p \in E }_\text{(2)} : \forall r : P \text{ and Not} (Q) \nonumber \end{align}
The last line reads as follows. There exists a point $p \in E$ such that whatever $r > 0$ its neighborhood $\mathcal{N}(p)$ 'captures' at least one 'weird' point of Y that does not belong to $E$ ($q' \in Y $, $q' \notin E$) (3).
We have by (2) $p \in E$, and by (1) $E = Y \cap G$, $p \in G$, so $p$ is an interior point of an open subset $G \subset X$. Therefore we can choose
$$ r > 0 : \mathcal{N}(p) \subset G \quad \text{(4)} $$
and we will still have a 'weird' point $q' \in \mathcal{N}(p)$ in it. That is, even if we 'squeeze' $\mathcal{N}(p)$ to fit into $G$, it will still contain a point $q' \notin E$.
As soon as we 'fit' $\mathcal{N}(p)$ into $G$, we blow up our initial assumption $E = Y \cap G$ since we have deduced that by (4)
$$ q' \in Y, \quad q' \in \mathcal{N}(p) \subset G, \quad \text{so} \quad q' \in G, \text{ or if combined } q' \in Y \cap G $$
But by hypothesis, by (3) and (1)
$$ q' \in Y, \quad q' \notin E, \quad E = Y \cap G, \quad \text{so} \quad q' \notin Y \cap G, \quad \text{a contradiction.} $$