Suppose $A \subset M$. Show that $\text{cl}_A(E) = A \cap \text{cl}_M(E)$ for any subset $E$ of $A$ (where the subscripts distinguish between the closure of $E$ in $(A,d)$ and the closure of $E$ in $(M,d)$).
I know the proof below is inefficient, but I was hoping to write something that relied only on the definitions of openness, closeness, and closure. I do think I'm making some mistakes and leaving some gaps (notes below), so I'd appreciate any feedback on what I'm doing wrong. Thanks!
The complements of the closures of $E$ in $M$ and $A$ are \begin{gather} \big(\text{cl}_M(E)\big)^C = \bigcup \{Z^C: Z^C \text{ is open in }M \text{ and } Z^C \subset E^C\}\\ \big(\text{cl}_A(E)\big)^C = \bigcup \{Y^C: Y^C \text{ is open in }A \text{ and } Y^C \subset E^C\} \end{gather} The set $(\text{cl}_A(E))^C$ is composed of any $x\in A$ for which $B_\epsilon^A(x) \subset E^C$ for some $\epsilon > 0$. Then \begin{align} \text{Because }B_\epsilon^A(x) &= B_\epsilon^M(x) \cap A, \text{the neighborhood }\\ B_\epsilon^A(x) \subset E^C &\equiv B_\epsilon^M(x) \subset E^C \cup A^C \\ &\equiv B_\epsilon^M(x)\setminus A^C \subset E^C \end{align}
So, we can write the complement of the closure in $A$ as \begin{align} (\text{cl}_A(E))^C &= \{x\in M: B_\epsilon^M(x) \subset A^C \cup E^C \text{ for some }\epsilon > 0\}\\ &= \{x\in M: B_\epsilon^M(x) \subset E^C \text{ for some }\epsilon > 0\} \cup A^C \end{align}
I'm having a hard time justifying why I'm including the union with $A^C$. Rewriting $A^C \cup E^C = (A \cap E^C) \cup (A^C \cap E^C) \cup (A \cap E^C)$ and because $E^C \subset A^C$ implies that $E^C \cap A = \emptyset$, $A^C \cup E^C = (A \cap E^C) \cup E^C$. My confusion may have to do with the fact that I'm considering all $x\in M$, while the complement of the closure in $A$ should be restricted to $x\in A$.
Then because \begin{align} (\text{cl}_M(E))^C &= \{x\in M: B_\epsilon^M(x) \subset E^C \text{ for some }\epsilon > 0\}\\ (\text{cl}_A(E))^C &= (\text{cl}_M(E))^C \cup A^C = (\text{cl}_M(E) \cap A)^C \end{align} and so $\text{cl}_A(E) = \text{cl}_M(E) \cap A$.
If you consider the alternative but equivalent view that $\operatorname{cl}_A(E)$ is the smallest closed subset (of $A$!) that contains $E$, the proof is quite a bit simpler: $\operatorname{cl}_M(E)$ is closed in $M$ and so $\operatorname{cl}_M(E) \cap A$ is closed in $A$ and as $E \subseteq A$ by assumption and $E \subseteq \operatorname{cl}_M(E)$ by properties of the closure, we know that $$E \subseteq \operatorname{cl}_M(E) \cap A \text{ and so } \operatorname{cl}_A(E) \subseteq \operatorname{cl}_M(E) \cap A$$ by minimality of the closure (the right hand side is a closed set of $A$ containing $E$ and $\operatorname{cl}_A(E)$ is the smallest one).
OTOH $\operatorname{cl}_A(E)$ must be closed in $A$ so there is a closed $C \subseteq M$ such that
$$\operatorname{cl}_A(E) = C \cap A$$
But then $E \subseteq \operatorname{cl}_A(E) \subseteq C$ and so
$$\operatorname{cl}_M(E) \subseteq C \text{ and so } \operatorname{cl}_M(E) \cap A \subseteq C \cap A = \operatorname{cl}_A(E)$$
showing the other inclusion.
You can also go via the balls-definition of closure and by definition $B^A_r(x) = B^M_r(x) \cap A$, so if $x \in \operatorname{cl}_A(E)$ this means that $x \in A$ and every ball $B^A_r(x)$ intersects $E$. But then every $B^M_r(x)$ also intersects $E$ (it's a superset) and so $x \in \operatorname{cl}_M(E)$ and so $x \in \operatorname{cl}_M(E) \cap A$. Conversely, if $x \in \operatorname{cl}_M(E) \cap A$ we know $x \in A$ and every ball $B^M_r(x)$ intersects $E$ (but then $B^A_r(x) = B^M_r(x) \cap A$ also intersects $E$, as $E \subseteq A$) and so $x \in \operatorname{cl}_A(E)$. It's quite trivial if you look at the two inclusions and what it means by definition to be in the closure.
The metric balls are a red herring of course, it works in any topological space, as does my general closure proof above.