This sounds really simple and I'm struggling with it.
I first tried to show that $X-A$ had to be closed by trying to show the complementary had to be open (trying to express it as union or intersection of known opens), but I couldn't do it: $(X-A)$ has to be open, and that equals $(X-Y)\cup (Y-A)$, I can't prove $Y-A$ is open, thoguh.
I googled some solution and found this:
If $Y$ is closed then we have: $A$ is closed in $Y$ iff $A=Y\cap B$ and $B$ is closed in $X$ iff $A\subseteq Y$ and $A$ is closed in $X$.
I don't know what is $B$, and I don't understand the argument in general.