Let $f, g : X \to Y$ be continuous functions. Assume that $Y$ is Hausdorff and that there exists a dense subset $D$ of $X$ such that $f(x) = g(x)$ for all $x \in D$. Prove that $f(x) = g(x)$ for all $x \in X$.
Here is what I have so far,
Proof:
Let $f : X \to Y$ and $g : X \to Y$ be continuous and suppose that $f(x)=g(x)$ for some dense $D\subset X$. Let $x \in X$, since $D$ is a dense subset of $X$, $x \in \mathrm{Cl}(D)$. I'm unsure how to proceed from here.