Q:

Set of accumulation points is closed for every subset

I was trying to prove the following statement:
Let $(X,\mathscr{T})$ be a topological space.  If the set of accumulation points of $\{x\}$ is closed for every $x\in X$, then the set of accumulation points of each subset of $X$ is closed. 
I've tried to start with, for a subset $S\subset X$, $x\in (S')'\setminus S'$, where $S'=\{\mbox{accumulation points of }S\}$, and get a contradiction, but all i've showed is that $x\in S$ and $\{x\}'\subset S'$ (but doesn't seem to help...):
You can choose an open set $V$ containing $x$ and such that $V\cap \left(S\setminus\{x\}\right)=\emptyset$ (because $x\notin S'$).  Then $\exists y\in V\cap S'$, so $V$ is a neighborhood of $y$, and then $V\cap (S\setminus\{y\})\ne\emptyset$. This implies necessarily that $V\cap (S\setminus\{y\})=\{x\}$ and $x\in S$.
If $y\in\{x\}'$, then every open neighborhood $U$ of $y$ is a open neighborhood of $x$ and, repeating the argument, $U\cap S\setminus\{y\}$ is non-void, so $y\in S'$.

Please, any hint?  Thanks! 

A:

Let $S$ be an arbitrary set, and let $x\notin S'$. Then there exists an open set $U$ such that $x\in U$ and $ U\cap S \subseteq \{x\}$. If $U\cap S=\varnothing$, then $U\subseteq X-S'$, so $x$ is in the interior of $X-S'$. So we may assume that $x\in S$ and $U\cap S=\{x\}$.
Now, the set of accumulation points of $\{x\}$ is closed; call it $C$.  Note that $x\notin C$, since there are no open sets $V$ that contain $x$ and such that $(V\cap\{x\})\setminus\{x\}\neq\varnothing$. Therefore, $X-C$ is an open neighborhood of $x$; let $W=U\cap (X-C)$, which is open and contains $x$. 
Show that $W\subseteq X-S'$.

