Clearly then all points $q\in N_k(p)$ for $0<k<r$ are in $E'$
This is wrong. All you know about $p$ is that it has points of $E$ arbitrarily close to it. Each $N_k(p)$ will contain a point of $E$, but it doesn't have to contain "many" of them or to be filled with them completely. Points of $N_k(p)$ other than $p$ may well not have a sequence of $E$-points converging on them. Perhaps the only presence of $E$ inside a small neighborhood around $p$ is just a sequence of points converging on $p$, but not on any other point there.
OK. General advice. Try to think geometrically, with pictures. Especially with metric spaces, you should always imagine little open balls of radius $\epsilon$ or whatever around some point. "Open set" means every point comes with a little ball around it that's entirely in the set, too. So you should always imagine that ball and put it to use. "Closed set" means every point NOT in it comes with a little ball around it that's also DISJOINT from the set. Or alternatively "closed set" means that every point arbitrarily close to us must be part of us.
Try to see if you understand why what's being claimed is true geometrically. $E'$ is the set of limit points, and we want it to be closed. Means that we ought to be able to prove: if $x \notin E'$, there's a little ball around $x$ that's also entirely not in $E'$, i.e. contains no limit points of $E$. How do we find the little ball? Clearly we need to understand exactly what it means to not be a limit point of $E$.
$x$ is a limit point of $E$ if any ball around $x$ contains a point from $E$ (apart from $x$ itself - I won't bother to repeat this condition every time).
Now negate:
$x$ is not a limit point if there's some ball around $x$ that does not contain a point from $E$.
OK, so now that we understand that, we know that any $x \notin E'$ already comes with a handy open ball $B_\epsilon(x) $ around it that is $E$-free. That's what "not being a limit point" means! But what we need is at least on the face of it a little more: we need a ball around $x$ that is $E'$-free, meaning every $y$ in that ball has its own ball around it that is $E$-free.
Can it be the same ball?
If you don't see this, draw an $x$, a small (open!) disc around it that is completely $E$-free (apart from $x$ itself, possibly), see if you can prove (by drawing) that everything in the disc is $\notin E'$.
After you figure out what the picture looks like, translate to formalism.
As levap pointed out in the comments, you’ve implicitly assumed that $E'\subseteq E$, which need not be true. However, it is still half of a correct argument. Since $\operatorname{cl}E=E\cup E'$, we know that
$$\begin{align*}
(E\setminus E')\cup(X\setminus\operatorname{cl}E)&=(E\setminus E')\cup\big(X\setminus(E\cup E')\big)\\
&=(E\setminus E')\cup\big((X\setminus E)\cap(X\setminus E')\big)\\
&=(E\setminus E')\cup\big((X\setminus E)\setminus E'\big)\\
&=X\setminus E'\;.
\end{align*}$$
You’ve shown that if $x\in E\setminus E'$, then $x$ has an open nbhd disjoint from $E'$. And $X\setminus\operatorname{cl}E$ is open and disjoint from $E'$, so every point of $X\setminus\operatorname{cl}E$ certainly has an open nbhd disjoint from $E'$. Thus, every point of $X\setminus E'$ has an open nbhd disjoint from $E'$, and $E'$ is therefore closed.
Best Answer
Another nice way to see this would be the following. Suppose $x\in \bar{S'}$. then there exists a sequence of numbers in $S'$ which converges to $x$. Let that sequence be $(x_n)$. But again as $x_n\in S'$, we have the following,
\begin{align*} x_{11}, &x_{12}, x_{13},\cdots \ \ \ \ \rightarrow x_1 && (\text{a sequence converging to} \ x_1) \\ x_{21}, &x_{22}, x_{23},\cdots \ \ \ \ \rightarrow x_2 && (\text{a sequence converging to} \ x_2) \\ x_{31}, &x_{32}, x_{33},\cdots \ \ \ \ \rightarrow x_3 && (\text{a sequence converging to} \ x_3) \\ \vdots \\ x_{n1}, &x_{n2}, x_{n3},\cdots \ \ \ \ \rightarrow x_n && (\text{a sequence converging to} \ x_n) \end{align*} Note that all the numbers $x_{ij}\in S$. Now use a diagonal argument to get a sequence in $S$ converging to the limit, $x=\lim_{n\rightarrow\infty}x_n$. This shows that $x\in S'$ by definition of $S'$.