Uniqueness of a continuous extension of a function into a Hausdorff space 
Suppose that $A\subset X$ and suppose that $f : A \to Y$ is a
  continuous function with $Y$ Hausdorff. Show that there is at most one continuous function $g : \bar{A} \to Y$.

My try: Suppose there are two extension $g$ and $h$, then for some $a\in \overline{A}-A$, we have $g(a)\neq h(a)$. As $Y$ is Hausdorff, there are two disjoint open set $U_{g(a)}$ and $U_{h(a)}$ such that $g(a) \in U_{g(a)}$ and $h(a) \in U_{h(a)}$. Now I have feeling somehow from here I have to construct open set $U$ of $a$ which does not intersect $A$.  But I am not able to do this.  Can someone please help me.
 A: A different solution is to take advantage of the following common fact about continuous functions into Hausdorff spaces.

Fact. Suppose that $g,h : X \to Y$ are continuous and $Y$ is Hausdorff. Then the set $$\{ x \in X : g(x) = h(x) \}$$ is a closed subset of $X$.

So, if $g,h : \overline{A} \to Y$ are both continuous extensions of $f$, then by the above we have that $F = \{ x \in X : g(x) = h(x) \}$ is a closed subset of $X$. As $A \subseteq F$, we have that $\overline{A} \subseteq F$.
A: Take the preimage of $U_{h(a)}$ and $U_{g(a)}$ under $h$ and $g$ respectively to get two open sets $U, V \subseteq \overline{A}$ each containing $a$.  Their intersection is an open set containing $a$.  Show that this intersection must contain a point of $A$.  Where does this point map to?
A: You have to continue in this way:
$g,h$ are continuous, so there exist two opens sets $V_g$, $V_h$ which contain $a$ such that $g(V_g)$ is contained in $U_g$ and $h(V_h)$ is contained in $U_h$. The intersection of $U_g$ and $U_h$ is empty, so the intersection of $g(V_g)$ and $h(V_h)$ is empty.
The intersection of $U_h$ and $U_g$ is an open set which contains $a$, so its intersection with $A$ is not empty, let $b$ belong to this intersection. As $b$ belongs to $A$, $h(b) = g(b)$, as $b$ belongs to the intersection of $U_h$ with $U_g$, $g(b)$ and $h(b)$ belong to $g(U_g)$ and $h(U_h)$, that contradicts the fact that the intersection of these two set is empty.
