I was looking at this answer, because I need to answer the same question:
Show that $F\subset Y$ is closed in $Y$ iff $F=Y\;\cap\;H$ where $H\subset X$ is closed in $X$.
The second answer (given by @egreg) states:
Let $x\in F$; then $x\notin Y\setminus F$, so $x\notin Y\cap A$ and therefore $x\notin A$. So $x\in H$.
But this would only be the case if $A \subset Y $, wouldn't it? So wouldn't that be incorrect?
I really like the format of his proof but I can't figure out how to correct it if it's incorrect.
Could somebody shed some insight?