If $X \subset Y \subset Z$ are Metric Spaces, if $d_Z(\cdot,\cdot):Z \times Z \rightarrow \mathbb{K}$ is the metric of $Z$, $d_Y(\cdot,\cdot):=d_Z(\cdot,\cdot)\restriction_{Y\times Y}$ is the metric of $Y$ and $d_X(\cdot,\cdot):=d_Z(\cdot,\cdot)\restriction_{X\times X}$ the metric of $X$ are the following sets the same ?
$$\overline{X}_Y := \{y\in Y\, | \,\,d_Y(y,X) =0 \} \,;\ \ \ \ \ \ \ \ d_Y(y,X) := \inf_{y' \in Y}d_Y(y,y')$$
$$\overline{X}_Z := \{z\in Z\, | \,\,d_Z(z,X) =0 \} \,;\ \ \ \ \ \ \ \ d_Z(z,X) := \inf_{z' \in Z}d_Y(z,z')$$
That is $\overline{X}_Y = \overline{X}_Z\,?$ If so can this be generalised for when $X,Y$ and $Z$ are topological spaces and the closure of $X$ being defined by the topological closure ?( i belive it to be something like the intersection of all closed sets in relation to $K= Y$ or $Z$ that contain $X$).
Here's the point-set way to get to the right conclusion. If you want to do it in metrics, everything is still true. First prove the following:
Lemma: Let $A$ be a subset of a space $Z$ and give $A$ the corresponding subspace topology. Prove that a set $C$ is closed in the subspace topology on $A$ if and only if $C = A \cap K$ for some set $K$ closed in $Z$.
With that it's not hard to prove the following, which is the answer to your question:
Proposition: Suppose we have a chain $X \subseteq Y \subseteq Z$ where $Z$ is a topological space. Write $\overline{X}_Z$ for the closure of $X$ in the space $Z$ and $\overline{X}_Y$ for the closure of $X$ in the subspace topology on $Y$ inherited from $Z$. Then $\overline{X}_Y = Y \cap \overline{X}_Z$.
From this, you get that $\overline{X}_Y = \overline{X}_Z$ if $Y$ is a closed set in $Z$.