I'm trying to verify some topological properties to see that for any topological space $(S,\mathcal{U})$, there is a continuous surjection $\pi\colon S\to T$ for $(T,\mathcal{V})$ a Tychonoff space, such that any continuous real valued function $f$ on $S$ can be expressed as $g\circ\pi$ for continuous real valued $g$ on $T$ and $\pi\colon S\to T$ continuous and surjective.
I start by taking $(S,\mathcal{U})$ and defining an equivalence relation $s\sim t\iff f(s)=f(t)$ for every continuous $f\colon S\to\mathbb{R}$. Let $Y$ be the set of such equivalence classes, and $\pi$ be the function mapping $s\in S$ to its equivalence class. So for continuous $f\colon S\to\mathbb{R}$, there is a unique $\phi(f)\colon Y\to\mathbb{R}$ such that $\phi(f)(\pi(s))=f(s)$. Then equip $Y$ with the weakest topology $\mathcal{V}$ such that each $\phi(f)$ is continuous, so every closed set in $Y$ has form $\bigcap_{i\in I}\phi(f_i)^{-1}(F_i)$ for some family $\{F_i\}$ of closed subsets of $\mathbb{R}$ and $\{f_i\}$ continuous.
My question is, why is $(Y,\mathcal{V})$ Hausdorff? I let $\pi(s)$ and $\pi(t)$ be distinct equivalence classes. Some observations I have are: $\phi(f)(\pi(s))=f(s)$ and $\phi(f)(\pi(t))=f(t)$. So $\pi(s)\in\phi(f)^{-1}(f(s))$ and in fact $\pi(s)\in\phi(f)^{-1}(f(z))$ for each $z\sim s$. By the same reasoning, $\pi(t)\in\phi(f)^{-1}(f(w))$ for each $w\sim t$. Also, $\phi(f)^{-1}(f(w))\cap\phi(f)^{-1}(f(z))=\emptyset$ since $f(z)\neq f(w)$.
This is as far as my reasoning takes me. What's a way to construct disjoint open sets containing $\pi(s)$ and $\pi(t)$ respectively? Thanks!