The question goes like this:
Let $(X, \mathcal{T})$ be topological space and let $(Y, \mathcal{U})$ be Hausdorff Topological space. Let $A \subseteq X$ be a non-empty subset. Suppose $f, g: X \to Y$ are continuous functions that agree on all points of $A$ (i.e., $f(a) = g(a) \ \forall a\in A$). Show that they must agree on all points of $\bar{A}$. Conclude that $A_{f, g} :=\{x \in X: f(x) = g(x)\} $ is closed.
Also conclude that if $f,g : X \to Y$ are continuous functions, $D \subseteq X$ is dense, $Y$ is Hausdorff, and $f(x) = g(x)$ for all $x \in D$ then $f = g$
I don't understand this problem clearly but here's my solution to the first part.
If $x \in \bar{A}$ then either $x \in A$ or $x$ is a limit point of $A$. Let's consider the situation where $x$ is a limit point of $A$.
Since $x$ is a limit point of $A$, every neighborhood of $x$ intersects $A$ in a point other than $x$. We aim to show that $f(x) = g(x)$.
Consider any neighborhood $U$ of $f(x)$ in $Y$. We know that $f$ and $g$ are continuous functions, so $f^{-1}(U)$ and $g^{-1}(U)$ are open neighborhoods of $x$ in $X$.
Since $x$ is a limit point of $A$, $f^{-1}(U)$ and $g^{-1}(U)$ intersect $A$ at points other than $x$. Let's denote one such point in $f^{-1}(U) \cap A$ as $a_1$, and the corresponding point in $g^{-1}(U) \cap A$ as $a_2$.
Since $f$ and $g$ agree on all points of $A$, we have $f(a_1) = g(a_1)$ and $f(a_2) = g(a_2)$. But both $a_1$ and $a_2$ are in the open set $f^{-1}(U) \cap g^{-1}(U)$, which implies that $f(x) = g(x)$ for any neighborhood $U$ of $f(x)$.
Therefore, $f(x) = g(x)$ for any $x$ that is a limit point of $A$.
Is my solution correct?
Your idea is fine and you are close, but you are not using the Hausdorfness of $Y$ (at least explicitly).
In my opinion, it is easier to not consider limit points specially. By definition, given subset $A$, $x \in {\rm Cl} A$ if all neighborhoods $U \subseteq X$ of $x$ intersect $A$.
So take arbitrary $x_0 \in {\rm Cl} A$. Consider the image of $x_0$ under the functions $f, g$; denote $y_1 = f (x_0)$ and $y_2 = g (x_0)$. Suppose for the sake of contradiction that $y_1 \ne y_2$. Since $Y$ is Hausdorff, there exist disjoint neighborhoods $V_1, V_2 \subseteq Y$ of $y_1, y_2$, respectively. By continuity of $f, g$, we have that $f^{-1} (V_1)$ and $g^{-1} (V_2)$ are open in $X$, respectively. Observe that both of these preimages contain $x_0$ and thus are neighborhoods of $x_0$ in $X$. Their intersection, $W = f^{-1} (V_1) \cap g^{-1} (V_2)$, is therefore also a neighborhood of $x_0$. By hypothesis, $W$ intersects $A$, say at some point $a_0$. The images of this element under $f$ and $g$ are equal, $b_0 = f (a_0) = g (a_0)$. This image is contained in both $V_1$ and $V_2$, which is a contradiction because we said earlier that $V_1, V_2$ are disjoint.
It must be the case, then, that $f (x_0) = g (x_0)$. Since $x_0$ was arbitrary, $f (x) = g (x)$ for any $x \in {\rm Cl} A$.