Let $f,g : X \rightarrow Y$ be continuous functions from a topological space $X$ into a Hausdorff space $Y$. Let $A \subset X$ and suppose $f(x)=g(x)$ for all $x \in A$. Prove $f(x) = g(x)$ for all $x \in \overline{A}$.
$\textbf{Definition:}$ $X$ is $\textbf{Hausdorff}$ means for each distinct pair of $x_1,x_2 \in X$, $\exists \, \text{disjoint open} \, U,V \subset X$ with $x_1 \in U$ and $x_2 \in V$ such that $U \cup V = X$.
$\textbf{Definition:}$ A function $f: X \rightarrow Y$ where $X,Y$ are topological spaces is $\textbf{continuous}$ means $\forall \, \text{open} \, V \subset Y$, $f^{-1}(V)$ is open in $X$.
I am unsure how to start this problem off. I wrote the two given definitions to try and get a clearer view on the goal. Any hint on how to begin this would be appreciated.
Take $x\in\overline A$ and suppose that $f(x)\ne g(x)$. Since $Y$ is Hausdorff, there are neighborhoods $V_f$ and $V_g$ of $f(x)$ and of $g(x)$ respectively such that $V_f\cap V_g=\emptyset$. Since $f$ is continuous, $f^{-1}(V_f)$ and $g^{-1}(V_g)$ are neighborhoods of $x$. Therefore, $f^{-1}(V_f)\cap g^{-1}(V_g)$ is also a neighborhood of $x$ and so it contains some $a\in A$. But then $f(a)\in V_f$ and $g(a)\in V_g$, which is impossible, since $f(a)=g(a)$ and $V_f\cap V_g=\emptyset$.