[proofplan]
We prove the two implications directly from the metric ball definition of openness. In the forward direction, each point of $U$ has a subspace ball contained in $U$, and the corresponding union of ambient balls gives the required [open set](/page/Open%20Set) $G\subset X$. In the reverse direction, an ambient open neighbourhood inside $G$ restricts to a subspace open neighbourhood inside $U$. The equality between subspace balls and intersections with ambient balls is the key identity in both directions.
[/proofplan]
[step:Construct an ambient open set from subspace balls]
For $x\in X$ and $r>0$, let $B_X(x,r)\subset X$ denote the ambient open ball
\begin{align*}
B_X(x,r)=\{z\in X:d(z,x)<r\}.
\end{align*}
For $y\in Y$ and $r>0$, let $B_Y(y,r)\subset Y$ denote the subspace open ball
\begin{align*}
B_Y(y,r)=\{z\in Y:d_Y(z,y)<r\}.
\end{align*}
Since $d_Y$ is the restriction of $d$ to $Y\times Y$, for every $y\in Y$ and every $r>0$ we have
\begin{align*}
B_Y(y,r)=Y\cap B_X(y,r).
\end{align*}
Assume first that $U$ is open in $(Y,d_Y)$. For each $u\in U$, choose a radius $r_u>0$ such that
\begin{align*}
B_Y(u,r_u)\subset U.
\end{align*}
Define
\begin{align*}
G=\bigcup_{u\in U}B_X(u,r_u)\subset X.
\end{align*}
If $U=\varnothing$, this union is the empty set.
We show that $G$ is open in $(X,d)$. Let $x\in G$. Then there exists $u\in U$ such that $x\in B_X(u,r_u)$, so $d(x,u)<r_u$. Define
\begin{align*}
\varepsilon=r_u-d(x,u)>0.
\end{align*}
If $z\in B_X(x,\varepsilon)$, then by the triangle inequality,
\begin{align*}
d(z,u)\le d(z,x)+d(x,u)<\varepsilon+d(x,u)=r_u.
\end{align*}
Thus $z\in B_X(u,r_u)\subset G$, and therefore $B_X(x,\varepsilon)\subset G$. Hence $G$ is open in $X$.
It remains to prove $U=Y\cap G$. If $u\in U$, then $u\in B_X(u,r_u)\subset G$ and $u\in Y$, so $u\in Y\cap G$. Hence $U\subset Y\cap G$.
Conversely, let $y\in Y\cap G$. Since $y\in G$, there exists $u\in U$ such that $y\in B_X(u,r_u)$. Since also $y\in Y$, the ball identity gives
\begin{align*}
y\in Y\cap B_X(u,r_u)=B_Y(u,r_u)\subset U.
\end{align*}
Thus $Y\cap G\subset U$. Therefore $U=Y\cap G$.
[guided]
The goal in this direction is to turn many small open neighbourhoods inside the subspace $Y$ into one open set in the ambient space $X$. We first fix the ball notation. For $x\in X$ and $r>0$, define the ambient ball
\begin{align*}
B_X(x,r)=\{z\in X:d(z,x)<r\}.
\end{align*}
For $y\in Y$ and $r>0$, define the subspace ball
\begin{align*}
B_Y(y,r)=\{z\in Y:d_Y(z,y)<r\}.
\end{align*}
Because the subspace metric is defined by $d_Y(z,y)=d(z,y)$ for $z,y\in Y$, membership in $B_Y(y,r)$ is exactly membership in the ambient ball together with membership in $Y$. Hence
\begin{align*}
B_Y(y,r)=Y\cap B_X(y,r)
\end{align*}
for every $y\in Y$ and every $r>0$.
Now assume that $U$ is open in the [metric space](/page/Metric%20Space) $(Y,d_Y)$. By the definition of openness in a metric space, for each $u\in U$ there exists a radius $r_u>0$ such that
\begin{align*}
B_Y(u,r_u)\subset U.
\end{align*}
These radii are chosen point by point, because relative openness only gives a local ball around each point of $U$.
Define the ambient candidate by taking the corresponding ambient balls:
\begin{align*}
G=\bigcup_{u\in U}B_X(u,r_u)\subset X.
\end{align*}
If $U=\varnothing$, this is the empty union, so $G=\varnothing$; the argument below is still valid because all pointwise assertions are then vacuous.
We verify that $G$ is open in $X$. Take any point $x\in G$. By the definition of union, there is some $u\in U$ such that $x\in B_X(u,r_u)$, meaning $d(x,u)<r_u$. The remaining distance from $x$ to the boundary of this particular ball is
\begin{align*}
\varepsilon=r_u-d(x,u)>0.
\end{align*}
If $z\in B_X(x,\varepsilon)$, then $d(z,x)<\varepsilon$. The triangle inequality in the metric space $(X,d)$ gives
\begin{align*}
d(z,u)\le d(z,x)+d(x,u)<\varepsilon+d(x,u)=r_u.
\end{align*}
Therefore $z\in B_X(u,r_u)$, and since $B_X(u,r_u)\subset G$, we have $z\in G$. This proves $B_X(x,\varepsilon)\subset G$, so every point of $G$ has an ambient ball contained in $G$. Hence $G$ is open in $(X,d)$.
Finally we prove the equality $U=Y\cap G$. First let $u\in U$. Since $d(u,u)=0<r_u$, we have $u\in B_X(u,r_u)$, hence $u\in G$. Also $u\in Y$ because $U\subset Y$. Thus $u\in Y\cap G$, proving
\begin{align*}
U\subset Y\cap G.
\end{align*}
For the reverse inclusion, let $y\in Y\cap G$. Since $y\in G$, by the definition of $G$ there exists $u\in U$ such that $y\in B_X(u,r_u)$. Since $y\in Y$, the subspace-ball identity applies:
\begin{align*}
y\in Y\cap B_X(u,r_u)=B_Y(u,r_u).
\end{align*}
The radius $r_u$ was chosen so that $B_Y(u,r_u)\subset U$, so $y\in U$. Hence
\begin{align*}
Y\cap G\subset U.
\end{align*}
Combining the two inclusions gives $U=Y\cap G$.
[/guided]
[/step]
[step:Restrict an ambient open set to obtain subspace openness]
Conversely, assume there exists an open set $G\subset X$ such that
\begin{align*}
U=Y\cap G.
\end{align*}
Let $u\in U$. Then $u\in G$. Since $G$ is open in $(X,d)$, there exists a radius $\rho_u>0$ such that
\begin{align*}
B_X(u,\rho_u)\subset G.
\end{align*}
Using the identity $B_Y(u,\rho_u)=Y\cap B_X(u,\rho_u)$, we obtain
\begin{align*}
B_Y(u,\rho_u)=Y\cap B_X(u,\rho_u)\subset Y\cap G=U.
\end{align*}
Thus every $u\in U$ has a subspace ball contained in $U$, so $U$ is open in $(Y,d_Y)$. This proves the reverse implication and completes the proof.
[/step]