Let $X$ be a regular Hausdorff space and $A$ a dense subalgebra (with 1) of $\mathcal{C}_b(X,\mathbb{K})$. Show that $A$ separates the points of $X$.
My attempt:
Let $x\ne y\in X$. We want to show $\exists f\in A: f(x)\ne f(y)$. Consider $B :=\{ f\in \mathcal{C}_b(X,\mathbb{K}): f(x)=f(y)\}$ (this is a Banach algebra for $\|\cdot\|_{\infty}$). It suffices to show that $B^c\ne \emptyset$. If $B^c=\emptyset$, then $\forall f\in \mathcal{C}_b(X,\mathbb{K}): f(x)=f(y)$. Consider one such $f$ and $\varepsilon >0$, then $\exists g\in A: \|f-g\|<\varepsilon/2$. Then $|f(x)-g(x)|=|f(y)-g(x)|<\varepsilon/2$ and $|f(y)-g(y)|=|f(x)-g(y)|<\varepsilon/2$. Then $|g(x)-g(y)|< \varepsilon$.
I don't see how to proceed from here. Any tips?
As $X$ is a regular Hausdorff space, then Urysohn's lemma applies and there exists a continuous $f:X \to [0,1]$ such that $f(x)=1$ and $f(y)=0$. Use your density argument to find that there is a $g \in A$ such that $||g-f|| < \frac{1}{3} $. Then we may apply the triangle inequality $$|g(x)-g(y)| = \\ =|(g(x)-f(x)) +(f(x)-f(y)) +(f(y)-g(y))| \\ \geq |f(x)-f(y)| - |g(x)-f(x)| - |f(y)-g(y)| \\ \geq1 -\frac{1}{3}-\frac{1}{3} \\ =\frac{1}{3} >0$$
So that g separates the ponts $x$ and $y$.