An application of a variation of the Stone-Weierstrass Theorem I'm working on Part D of the following question:

I am trying to use the following variation on Stone-Weierstrass:

Let $U$ be a non-compact locally compact hausdorff space. If $\mathcal{A}$ is a closed subalgebra of $C_0(U,\mathbb{R})$ (the continuous functions from $U$ to $\mathbb{R}$ which vanish at infinity) which separates points. Then $\mathcal{A}=C_0(U,\mathbb{R})$ or $\mathcal{A}=\{f \in C_0(U,\mathbb{R}):f(x_0)=0\}$ for some $x_o\in U$

I'm having trouble seeing how to use the theorem and why $U$ should not be compact. Thoughts?
A solution is given here: https://pdfs.semanticscholar.org/b602/17d061e2f6ca4c592edf5efb7bcb19320b04.pdf
I am having trouble following it though.
 A: The first part a) is easy: We have $h(J) = \bigcap_{f \in J} f^{-1}(\{0\})$. Since every $f \in J$ is continuous, this set is closed as the intersection of the closed sets $f^{-1}(\{0\})$. In b) obviously $k(E)$ is also an ideal. Here we denote $\pi_x \colon C(X) \rightarrow \mathbb{R}$ the projection on the point $x$, i.e. $\pi_x(f) = f(x)$. Then $\pi_x$ is continuous and $k(E) = \bigcap_{x \in E} \pi_x^{-1}(\{0\})$, i.e. $k(E)$ is closed. (One can also argue by using sequences in order to prove that $k(E)$ is sequentially closed and thus closed, since $C(X)$ is a metric space.)  
c) can be shown as follows: First, let $x \in E$, then for any $f \in k(E)$ we have $f(x)=0$. Thus $x \in h(k(E))$ by definition. SInce $h(k(E))$ is closed, we have $\overline{E} \subset h(k(E))$. On the other hand, for any $x \notin \overline{E}$, there exists by Urysohn's lemma a function $f \colon X \rightarrow [0,1]$ with $f(x) =1$ and $f(y) =0$ for all $y \in \overline{E}$. Thus $f \in k(E)$ by definition and, because $f(x) =1$, we get $x \notin h(k(E))$. 
Let us prove now d): Let $f \in J$, then for any $x \in h(J)$ we have $f(x) =0$. Thus $f \in k(h(J))$. Since this set is closed, we also get $\overline{J} \subset k(h(J))$. Now, we use the hint: Let $U = X \subset h(J)$. This is a open set and is not necessary compact. 
Counterexample: If $X=[0,1]$ we can take $x_0 =0$ and the maximal ideal $J = \{f \in C([a,b]): f(x_0) =0\}$, then $h(J) = \{0\}$. Thus $X \setminus h(J) = (0,1]$ is not compact.
For any $\varepsilon >0$ we can cover $h(J)$ with finite many open sets $V_1,\ldots,V_n$ such that $|f(x)| < \varepsilon$  for fixed $f \in k(h(J))$, because $h(J)$ is compact. Set $V = V_1 \cup \ldots \cup V_n$. Then $K^c = V^c = V_1^c \cap \ldots \cap V_n^c$ is compact in $X$ and hence also in $U$. We verified that $k(h(J)) \subset C_0(U)$. Note that this set is a closed subalgebra of $C_0(U)$.
Thus $\mathcal{A}:= \overline{J}$ is a closed subalgebra of $C_0(U)$. By definition for any $x \in U$ there exists at least one $f_x \in J$ with $f_x(x) \ne 0$. Let $x,y \in U$ are different points, we can use Urysohn's lemma to find functions $h_x$ and $h_y$ with $h_x(x)=1$ and $h_x(z) = 0 $ for $z \in h(J) \cup \{y\}$, resp.  $h_y(y)=1$ and $h_y(y) = 0$ for $z \in h(J) \cup \{x\}$. Now define
$$h(z) :=  h_x(z) \frac{f_x(z)}{f_x(x)} - h_y(z) \frac{f_y(z)}{f_y(y)}.$$
Then $h \in J$ with $h(x) =1 \neq -1 =h(y)$. Hence $\mathcal{A}$ separates points and also vanishes nowhere. Stone-Weierstraß already shows that $\mathcal{A} = C_0(U)$ and thus $\mathcal{A} = k(h(J))$.
The last part is now a consequence of the previous ones: If $E$ is a closed set in $X$, then $k(E)$ is a closed ideal in $C(X)$ with $h(k(E)) =E$. On the other hand, any closed ideal $J$ in $C(X)$ gives a closed set $h(J)$ with $k(h(J)) = J$. 
