I came across this theorem(2.30) in Rudin's text on analysis. Suppose $Y\subset X$. A subset $E$ of $Y$ is open relative to $Y$ if and only if $E=Y\cap G$ for some open subset $G$ of $X$. (A set $E\subset Y$ is open relative to $Y$ when for every $p\in E$, there is an $r_p>0$ such that $q\in Y$ and $d(p, q)<r_p$ implies $q\in E$.)
I can understand the proof he has provided. He has tried to construct such a $G$ by defining open sets $V_p$ as follows: $V_p=\{q\in X|d(p,q)\}<r_p$ and has taken $G= \cup_{p\in E}V_p$ which is good enough to prove that $E\subset G\cap Y$.
But I am still unable to understand the geometric intuition behind this; in particular, what is the geometric motivation behind such a construction? I am interested in a better way to visualize this which will allow me to construct a formal proof by looking at the picture.