[proofplan]
We prove the categorical epimorphism condition directly. Given continuous maps $f,g: X \to Y$ into a [Hausdorff space](/page/Hausdorff%20Space) $Y$ that agree on the dense subspace $A$, we consider the equalizer set $E = \{x \in X : f(x)=g(x)\}$. The Hausdorff property makes this equalizer closed, and density forces every closed subset of $X$ containing $A$ to be all of $X$. Therefore $E=X$, so $f=g$.
[/proofplan]
[step:Reduce epimorphism to equality of maps that agree on the dense subspace]
Let $Y$ be a Hausdorff topological space, and let $f,g: X \to Y$ be continuous maps such that $f \circ i = g \circ i$. Since $i: A \to X$ is the inclusion map, this condition means that for every $a \in A$,
\begin{align*}
f(a) = g(a).
\end{align*}
We must prove that $f=g$ as maps from $X$ to $Y$, meaning that for every $x \in X$,
\begin{align*}
f(x)=g(x).
\end{align*}
[guided]
To prove that $i$ is an epimorphism in $\mathbf{Haus}$, we use the definition of epimorphism in a category: a morphism $i: A \to X$ is an epimorphism if, for every object $Y$ and every pair of morphisms $f,g: X \to Y$, the implication
\begin{align*}
f \circ i = g \circ i \implies f=g
\end{align*}
holds.
Here the objects are Hausdorff topological spaces and the morphisms are continuous maps. Thus let $Y$ be a Hausdorff topological space, and let $f,g: X \to Y$ be continuous maps satisfying $f \circ i = g \circ i$. Because $i$ is the inclusion map, $i(a)=a$ for every $a \in A$. Therefore
\begin{align*}
f(a) = f(i(a)) = (f \circ i)(a) = (g \circ i)(a) = g(i(a)) = g(a)
\end{align*}
for every $a \in A$. The task is to upgrade equality on the [dense subset](/page/Dense%20Subset) $A$ to equality on all of $X$.
[/guided]
[/step]
[step:Show the equalizer of the two maps is closed]
Define the equalizer set $E \subset X$ by
\begin{align*}
E := \{x \in X : f(x)=g(x)\}.
\end{align*}
We prove that $E$ is closed in $X$. Let $x \in X \setminus E$. Then $f(x) \neq g(x)$. Since $Y$ is Hausdorff, there exist open sets $U,V \subset Y$ such that
\begin{align*}
f(x) \in U, \qquad g(x) \in V, \qquad U \cap V = \varnothing.
\end{align*}
Because $f$ and $g$ are continuous, the sets $f^{-1}(U)$ and $g^{-1}(V)$ are open in $X$. Define the open neighbourhood $W \subset X$ of $x$ by
\begin{align*}
W := f^{-1}(U) \cap g^{-1}(V).
\end{align*}
For every $w \in W$, we have $f(w) \in U$ and $g(w) \in V$, so $f(w) \neq g(w)$ because $U \cap V=\varnothing$. Hence $W \subset X \setminus E$. Thus every point of $X \setminus E$ has an open neighbourhood contained in $X \setminus E$, so $X \setminus E$ is open. Therefore $E$ is closed in $X$.
[guided]
We introduce the set on which the two maps already agree:
\begin{align*}
E := \{x \in X : f(x)=g(x)\}.
\end{align*}
The goal is to prove $E=X$. The key topological input is that $E$ is closed when the target space $Y$ is Hausdorff.
Let $x \in X \setminus E$. By definition of $E$, this means $f(x) \neq g(x)$ in $Y$. Since $Y$ is Hausdorff, distinct points in $Y$ can be separated by disjoint open neighbourhoods. Therefore there exist open sets $U,V \subset Y$ such that
\begin{align*}
f(x) \in U, \qquad g(x) \in V, \qquad U \cap V = \varnothing.
\end{align*}
Now we pull these separating neighbourhoods back to $X$. Since $f: X \to Y$ and $g: X \to Y$ are continuous, the preimages $f^{-1}(U)$ and $g^{-1}(V)$ are open subsets of $X$. Define
\begin{align*}
W := f^{-1}(U) \cap g^{-1}(V).
\end{align*}
Then $W$ is open in $X$ because it is the intersection of two open subsets of $X$, and $x \in W$ because $f(x)\in U$ and $g(x)\in V$.
For every $w \in W$, the definitions of the two preimages give
\begin{align*}
f(w) \in U, \qquad g(w) \in V.
\end{align*}
Since $U$ and $V$ are disjoint, these two values cannot be equal. Thus $w \notin E$, and therefore $W \subset X \setminus E$. We have shown that each point of $X \setminus E$ has an open neighbourhood contained in $X \setminus E$, so $X \setminus E$ is open. Hence $E$ is closed in $X$.
[/guided]
[/step]
[step:Use density to force the closed equalizer to be all of $X$]
From $f \circ i = g \circ i$, we have $f(a)=g(a)$ for every $a \in A$, so $A \subset E$. Since $A$ is dense in $X$, its closure in $X$ satisfies
\begin{align*}
\overline{A}=X.
\end{align*}
Because $E$ is closed in $X$ and contains $A$, it contains $\overline{A}$. Therefore
\begin{align*}
X=\overline{A} \subset E \subset X.
\end{align*}
Hence $E=X$.
[guided]
We now combine the two ingredients: agreement on $A$ and closedness of the equalizer.
From the assumption $f \circ i=g \circ i$, and because $i$ is the inclusion map, we proved that
\begin{align*}
f(a)=g(a)
\end{align*}
for every $a \in A$. By the definition of $E$, this says exactly that $A \subset E$.
The subset $A$ is dense in $X$, so its closure in $X$ is all of $X$:
\begin{align*}
\overline{A}=X.
\end{align*}
The set $E$ is closed in $X$ by the previous step. Any closed subset of $X$ that contains $A$ must contain the closure of $A$, because $\overline{A}$ is the smallest closed subset of $X$ containing $A$. Therefore
\begin{align*}
X=\overline{A} \subset E.
\end{align*}
Since $E$ was defined as a subset of $X$, we also have $E \subset X$. Thus
\begin{align*}
X=\overline{A} \subset E \subset X,
\end{align*}
and consequently $E=X$.
[/guided]
[/step]
[step:Conclude that the inclusion is an epimorphism in $\mathbf{Haus}$]
Since $E=X$, for every $x \in X$ we have $x \in E$, and hence
\begin{align*}
f(x)=g(x).
\end{align*}
Thus $f=g$ as maps $X \to Y$. Since this holds for every Hausdorff space $Y$ and every pair of continuous maps $f,g: X \to Y$ satisfying $f \circ i=g \circ i$, the inclusion map $i: A \to X$ is an epimorphism in $\mathbf{Haus}$.
[/step]