Extension of continuous map in topological space In the book  Simmons, George F., Introduction to topology and modern analysis,  page no- 98, question no- 2, the problem is : Let $X$ be a topological space and a $Y$ be metric space and $f:A\subset X\rightarrow Y$ be a continuous map. Then $f$ can be extended in at most one way to a continuous mapping of $\bar{A}$ into $Y$.
I am trying to prove this way. Let $x_0\in \bar{A}-A$ and suppose that there is two extension $f$ and $g$ such that $f(x)=g(x)$ for $x\in A$. Now $f(x_0)\in \overline{f(A)}$ and $g(x_0)\in\overline {g(A)}$. So there exists a sequence $\{f(x_n)\}$ and $\{g(y_n)\}$ that converge to $f(x_0)$ and $g(x_0)$ respectively, where $x_n$ and $y_n$ belong to $A$ for all $n$. Then I am stuck!! Please help to complete the proof.
 A: The following is a well-known result in point-set topology.

Proposition. Two continuous functions $f, g \colon X \to Y$ from a topological space $X$ to a Hausdorff space $Y$, that coincide over a dense subset $D \subseteq X$, necessarly coincide everywhere.

Proof. Consider the set $$Z :=\{x \in X \,  | \, f(x)=g(x)\} \subseteq X.$$ Then $Z$ is closed in $X$, since it is the preimage of the diagonal of $Y \times Y$ (that is closed because $Y$ is Hausdorff) via the continuous map $$h \colon X \to Y \times Y, \quad x \mapsto (f(x), \, g(x)).$$ On the other hand, by assumption $D \subseteq Z$ and so,  since $D$ is dense in $X$, we obtain $$X = \bar{D} \subseteq \bar{Z} = Z,$$
that is $X = Z$ and the proof is complete.
Now we can get what you want from the Proposition above, because $A$ is dense in $\bar{A}$ and $Y$ is metric, hence Hausdorff.
A: To follow your idea: Suppose we have $f_1$ and $f_2$ that are both continuous extensions of $f: A \to Y$ to $\overline{A}$. Let $p \in \overline{A}$ and so we have a net $a_i, i \in (I,\le)$ from $A$ such that $a_i \to p$.
The continuity of $f_1$ implies that $f_1(a_i) \to f_1(p)$.
The continuity of $f_2$ implies that $f_2(a_i) \to f_2(p)$ .
But the nets (as $f_1(a_i) = f_2(a_i) = f(a_i)$) are identical so must converge to the same point in the metric space $Y$ (limits of sequences are unique).
We conclude that $f_1(p) = f_2(p)$
As this holds for all $p \in \overline{A}$, $f_1 = f_2$ on $\overline{A}$.
A: Some caveats: If A is also a metric space, then f must be uniformly continuous, as this preserves Cauchy sequences , while standard continuity does not.
An example, for $A =\mathbb Q \subset \mathbb R$ , choose $f(x):= \frac {1}{ x-\sqrt 3} $. This is continuous in $\mathbb Q$ but will not extend continuously into $\mathbb R$, as $f$ will blow up near $\sqrt 3$. So you can't extend , since $f$ is not uniformly continuous and will not preserve Cauchy, i.e., while the sequences $\{x_n\}$ with $x_n \rightarrow x$ are Cauchy, the "Pushforward " sequences {$f(x_n) \}$ with $x_n \rightarrow x$ are not, and will therefore not necessarily converge.
A: To follow your ides: Assume for a contradiction that $f(x_0)\neq g(x_0)$ and choose $\epsilon=\frac{d(f(x_0),g(x_0))}{4}>0$, where $d$ is the metric of the metric space $Y$. Let $N=f^{-1}(B_{\epsilon}(f(x_0)))\cap g^{-1}(B_{\epsilon}(g(x_0)))$. Since $f$ and $g$ are continuous, $N$ is a neighborhood of $x_0$. Since $x_0\in \overline{A}$, $N\cap A\neq \emptyset$. Moreover, $x_0\in \overline{N\cap A}$ since $\overline{N\cap A}\subset \overline{N}\cap \overline{A}$. Then, the continuity of $f$ implies that $f(\overline{N\cap A})\subset\overline{f(N\cap A)}=\overline{g(N\cap A)}\subset \overline{g(g^{-1}(B_{\epsilon}(x_0)))}\subset \overline{B_{\epsilon}(g(x_0))}$. Then, the fact that $x_0\in \overline{N\cap A}$ implies that $$d(f(x_0),g(x_0))\leq \epsilon=\frac{d(f(x_0),g(x_0))}{4},$$ which is clearly a contradiction.
