Continuous Extension Mapping Let assume $A$ is a dense subspace of a topological space $X$ and $f$ is a continuous mapping of $A$ to a regular space $Y$. 
the question is :-
Show that the mapping $f$ has a continuous extension over $X$ if and only if $f$ has a continuous extension over $A \cup \{x\}$ for every $x\in X\backslash A$.
Remark:-
The assumption of regularity of $Y$ cannot be weakened to the assumption that $Y$ is a Hausdorff space. 
Edit:- This is problem form General Topology of Engulking, and Engelking included the assumption that X is a $T_{1}$-space in the definition of regular.
 A: $\newcommand{\cl}{\operatorname{cl}}$For $x\in X\setminus A$ let $f_x:A\cup\{x\}\to Y$ be a continuous extension of $f$, and for $x\in A$ let $f_x=f$. Let 
$$g:X\to Y:x\mapsto f_x(x)\;;$$
we wish to show that $g$ is continuous. 
If not, there is a set $C\subseteq X$ such that $g[\cl_XC]\nsubseteq\cl_Yg[C]$. In particular, there is an $x\in(\cl_XC)\setminus C$ such that $g(x)\notin\cl_Yg[C]$. Suppose that $x\in\cl_X(C\cap A)$. The map $f_x$ is continuous on $A\cup\{x\}$, so 
$$g(x)=f_x(x)\in\cl_Yf_x[C\cap A]\subseteq\cl_Yg[C]\;;$$
thus, $x\notin\cl_X(C\cap A)$, and it follows that $x\in\cl_X(C\setminus A)$. Let $D=C\setminus A$; then $x\in\cl_XD$, but $g(x)\notin\cl_Yg[D]$.
Since $Y$ is regular, there are open $U,V\subseteq Y$ such that $g(x)\in U$, $\cl_Yg[D]\subseteq V$, and $U\cap V=\varnothing$. Let $G=f_x^{-1}[U]$; $G$ is an open nbhd of $x$ in $A\cup\{x\}$, so $\operatorname{int}_X\cl_XG$ is an open nbhd of $x$ in $X$, and we can choose a point $z\in D\cap\operatorname{int}_X\cl_XG$. Note that 
$$\cl_XG=\cl_X(G\setminus\{x\})=\cl_X(G\cap A)=\cl_Xf^{-1}[U]\;,$$
so $z\in\cl_Xf^{-1}[U]$. 
Let $H=f_z^{-1}[V]$. Then $\operatorname{int}_X\cl_XH$ is an open nbhd of $z$ in $X$, so $f^{-1}[U]\cap\operatorname{int}_X\cl_XH\ne\varnothing$, and therefore $f^{-1}[U]\cap\cl_XH\ne\varnothing$. And $\cl_XH=\cl_Xf^{-1}[V]$, so $f^{-1}[U]\cap\cl_Xf^{-1}[V]\ne\varnothing$, and therefore $f^{-1}[H]\cap\cl_Af^{-1}[V]\ne\varnothing$, since $f^{-1}[U]\subseteq A$ and $f^{-1}[V]\subseteq A$. Finally, $f^{-1}[U]$ is open in $A$, so $f^{-1}[H]\cap\cl_Af^{-1}[V]\ne\varnothing$ implies that $f^{-1}[U]\cap f^{-1}[V]\ne\varnothing$, which is false. 
Thus, no such set $C$ exists, and $g$ is in fact continuous.

This argument was suggested by the following counterexample when $Y$ is not regular. Let $S=\{2^{-n}:n\in\Bbb N\}$, $A=S\times S$, $C=S\times\{0\}$, and $p=\langle 0,0\rangle$. Let $X=\{p\}\cup C\cup A$, and let $\tau$ be the topology that $X$ inherits from $\Bbb R^2$. Let $\tau'=\tau\cup\{U\setminus C:U\in\tau\}$, and let $Y$ denote the space $\langle X,\tau'\rangle$. $Y$ is not regular: $C$ is a closed set in $Y$ that cannot be separated from $p$ by disjoint open sets. Let $f$ be the identity map on $A$, considered as a map from $X$ to $Y$. For each $x\in X\setminus A$ let $f_x$ be the identity map on $A\cup\{x\}$, again considered as a map from $X$ to $Y$. Then $f$ and the maps $f_x$ are continuous. Moreover, each $f_x$ is the unique continuous extension of $f$ to $A\cup\{x\}$, so the only possible continuous extension of $f$ to $X$ is the identity map from $X$ to $Y$. This, however, is not continuous, since $X\setminus C$ is not open in $X$, so $f$ has no such extension. The obstacle to continuity presented by the point $p$ and the set $C$ turns out to be (a) typical and (b) ruled out by regularity of $Y$.
A: The problem is reduced to the following, for the same $X$, $Y$ and $A$.  Assume that a mapping $f \colon X \to Y$ is such that for every $x \in X$, the restriction of $f$ to $A \cup \{x\}$ is continuous. Prove that $f$ is continuous.
To do this, take $b \in X$, and we'll prove $f$ is continuous at $b$. Let a neighbourhood $W$ of $f(b)$ be given. We wish to construct a neighbourhood $V$ of $b$ such that $f(V) \subseteq W$. Since $Y$ is regular, there is a closed neighbourhood $W_1$ of $f(b)$ that is contained in $W$.
Since $f$ is continuous over $A \cup \{b\}$, there is a neighbourhood $V$ of $b$ satisfying $f(V \cap (A \cup \{b\})) \subseteq W_1$. We will show that $f(V) \subseteq W_1 \subseteq W$. 
Let $x \in V$. The function $f$ is continuous on $A \cup \{x \}$, hence the set $E = f^{-1}(W_1) \cap (A \cup \{x\})$ is closed in $A \cup \{x\}$. But $E$ also contains $V \cap A$, which is dense in $V$, hence in $V \cap (A \cup \{x \})$. Therefore $x \in E$, proving that $f(x) \in W_1$.
