Questions on proof of theorem 2.30 in Baby Rudin. Before I ask questions about the proof I am having trouble differentiating between these two definitions that are related to the proof.
Def. 1. $E$ is open in $X$ means to each point $p \in E\ \exists r>0$ such that $$ d(p,q)<r,\ q \in X \Rightarrow q \in E. $$
Def. 2. $E$ open relative to $Y$ if to each point $p \in E\ \  \exists r>0$ such that $q \in E$ whenever $$d(p,q)<r\ \&\ q \in Y$$
To me, both of these definitions seem to be the same (and trivial, to be honest). So what is the "big" difference?
And now, this is the proof my professor gave in class which is more or less the same as Rudin's. I am looking for clarification on some parts (to be honest, most parts) of the proof. My comments and questions in bold refer to the statement above.
$\textbf{Theorem}$. Suppose $Y \subseteq 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$.
$Proof.$ $(\Rightarrow)$ Suppose $E$ is open relative to $Y$. To each $p \in E,\ \exists r_p >0$ such that
$$d(p,q) < r_p,\ q \in Y \Rightarrow q \in E.$$
Let $V_p$ be the set of all $q \in X$ such that $d(p,q) < r_p$ and define $G = \cup _{p \in E}\ V_p$.
Why do this? Just because is works?
Then $G$ is an open subset of $X$.
$G$ is an open subset of $X$ because arbitrary union of open sets is open. Right?
Since $p \in V_p\ \forall p \in E$,  it is clear that $E \subseteq G \cap Y.$
This is not "clear" like my professor states, please explain.
By our choice of $V_p$, we have $V_p \cap E \subseteq E$ for every $p \in E$ so that $G \cap Y \subseteq E$.
This makes sense in my head if I think in terms of sets in general. It's always true that the intersection of two sets is a subset of each of the sets, so it's no different in this case. BUT the words "by our choice" is bothering me, should it? Lastly, I don't understand why the intersection of $G$ and $Y$ would be a subset of $E$.
Hence, $E = G \cap Y$.
$(\Leftarrow)$ Conversely, if $G$ is open in $X$ and $E = G \cap Y$, every $p \in E$ has a neighborhood $V_p \subseteq G$. Then,
$$V_p \cap Y \subseteq E$$
so that $E$ is open relative to $Y$. $□$
Thank you all in advance for the help.
 A: Let $B(p,r)=\{q \in X : d(p,q) < r\}$ which is an open ball of radius $r$ in $X$. $E$ open in $X$ means that for any point $p$ in $E$ we can find an open ball small enough so that every point (of $X$) in the ball is also in $E$, i.e., $B(p,r)\subset E$.
On the other hand, open relative to $Y$ means that we only care about points in the ball that are in $Y$, in other words for any point $p$ in $E$ we may find an open ball containing $p$ that is small enough that every point (of $Y$) in the ball is also in $E$. So we are considering $B(p,r)\cap Y \subset E$.
On to the proof. What is happening here is that we are going to cover $E$ in small open balls $V_p=B(p,r_p)$. This cover is given by $G=\bigcup_{p\in E} V_p$ and is (indeed) open as it is a union of open sets. As it is a cover, $E \subset G$. (Not to beat a dead horse, but if this still isn't entirely clear, $p \in V_p$, so $E = \bigcup_{p\in E} \{p\} \subset \bigcup_{p\in E} V_p = G$.)
Now, in the hypothesis we have $E \subset Y$ and because $E\subset G$,
$$ E = E\cap E = (E \cap Y) \cap (E \cap G) \subset Y \cap G $$
This fact is really just the obvious fact that if two sets contain a common subset then their intersection also contains this subset.
["By choice"] We constructed each $r_p$ from the definition of open relativeness, hence $V_p \cap Y = B(p,r_p) \cap Y\subset E$. Therefore
$$G\cap Y = \left(\bigcup_{p\in E}V_p\right) \cap Y 
=\bigcup_{p\in E}(V_p \cap Y)
\subset \bigcup_{p\in E} E 
= E
$$
Don't get too worked up about Rudin saying "by choice", it was really just his way of skipping the explanation I just gave.
A: Consider $E = [0, 2]$ then $E$ is not open.  Consider $p = 0$ then there is no $r$ so that $d(0,q) < r \implies q \in E$ because if $q = 0-r/2$ then $q \not \in E$ but $d(0, q) = r/2 < r$.
But consider $E = [0,2]$ and $Y = (1/2, 3/4)$.  Consider $p = 0$ then for any $r$ if $d(0,q) < r$ AND if $q\in Y$ then $q \in E$.  Our counter example of $q = 0-r/2$ won't do anymore because $q= 0 -r/2 \not \in Y$.
Indeed as $Y \subset E$ so if $q \in Y$ then $q \in E$ so $E$ must be open in $Y$.
Basically taking $E$ open in $Y$ just means to restrict our "space" to $Y$.
Take $E = (0, 100]$ and $Y= [-1, 7]$. $E$ is open relative to $Y$.  For any point in $p \in E$ then for any $r > 0$, if $d(p,q) < r$ then $q \in Y$.  We don't have to worry about $p = 100$ because that's completely beyond any consideration of $Y$--- if $d(100, q) < 93$ then $q \not \in Y$ so $(d(100, q) < 93$ and $q \in Y) \implies q \in E$ (also $(d(100,q) < 93$ and $q \in Y) \implies \text {I'm a green unicorn}$).
