Showing that if the restriction of $f$ to closed subspaces is continuous, then $f$ is continuous $X$ is a space equal to $A\bigcup B$, where A and B are subspaces of X. Define $F:X\rightarrow Y$. Let the restricted functions $F|A:A\rightarrow Y$ and $F|B:B\rightarrow Y$ be continuous. I want to show that, if A and B are closed in X, then F is continuous.
What I have:
$F$ is continuous in $A$, so $\exists \delta , U(a\in A, \delta)$ has a corresponding epsilon ball $U(y\in Y, \epsilon)$, and same for B. I also know that $X=A\bigcup B$, so that $F(A\bigcup B)=F(X)$. I want to claim here then that $F(X) = F(A)\bigcup F(B)$, and any delta ball in X has a corresponding epsilon ball in F(X). However, I don't know if this is right, or how to make the proof strong, especially since I don't know how A and B being closed in X affects the result
 A: This is one of those instances where general topology makes things both more general and easier. In fact the result is true when $X$ is a mere topological space, and $A$ and $B$ are subspaces in the topological sense.
Topological Proof:

To prove $f$ continuous we must prove that for any $C$ closed in $Y$, $f^{-1}(C)$ is closed in $X$. Now
  $$f^{-1}(C)=(f^{-1}(C)\cap A)\cup(f^{-1}(C)\cap B)$$
  and by hypothesis both sets are closed in the subspace topology. This means that
  $$f^{-1}(C)\cap A=A\cap K$$
  $$f^{-1}(C)\cap B= B\cap H$$
  where $K,H$ are closed in $X$. But this means that $f^{-1}(C)\cap A$ and $f^{-1}(C)\cap B$ are both closed, being the intersection of two closed sets. Therefore $f^{-1}(C)$ is closed being the union of two closed sets.

NOTE: The same result remains true if $A$ and $B$ are both open. The exact same proof works, just proving that $f^{-1}(U)$ is open for any $U\subset Y$ open.
A counterexample with $A$ and $B$ not both open or closed is $f(x)=\chi_{[0,+\infty)}(x) $ and $A=(-\infty,0)$, $B=[0,+\infty)$, with the Euclidean topology.
A more metric-space flavoured proof: 

Fix any $x\in A$. By hypothesis for every $\epsilon>0$ there is $\delta(\epsilon,A)$ such that for every $y\in A$
   $$d(x,y)<\delta(\epsilon, A)\implies d(f(x),f(y))<\epsilon.$$
  If $x\in B$ the same is true for another $\delta(\epsilon, B)$ and $y\in B$. Then setting $\delta(\epsilon)=\min\{\delta(\epsilon, A),\delta(\epsilon, B)\}$, for every $y\in X$ we have
  $$d(x,y)<\delta(\epsilon)\implies d(f(x),f(y))<\epsilon$$
  and this is true for every $\epsilon>0$, thus $f$ is continuous at $x$.
If instead $x\not\in B$, the ball $B(x,\delta)$ is not contained in $B$ for $\delta\leq \delta_x$, with $\delta_x$ small enough, since $B$ is closed. Thus for $\delta\leq \delta_x$ we have $B(x,\delta)\cap A= B(x,\delta)$ and setting $\delta(\epsilon)=\min\{\delta_x,\delta(x,A)\}$, for every $y\in X$ again the implication 
  $$d(x,y)<\delta(\epsilon)\implies d(f(x),f(y))<\epsilon$$
  holds.

A: Let $X$ be a vector space over any field.  Suppose $X = A \cup B$ where $A$ and $B$ are both subspaces. 
Claim: Either $A \subseteq B$ or $B \subseteq A$. 
Proof:  Suppose not. Then we can find a point $a \in A \cap B^c$ and another point $b \in B \cap A^c$.  Then $(a+b)$ is a linear combination of points in the vector space $A \cup B$, and so $(a+b) \in A \cup B$. 
Case 1:  Suppose $(a+b) \in A$.  Then $a \in A$ and $(a+b) \in A$ and so every linear combination of $a$ and $(a+b)$ is also in $A$. We can reach a simple contradiction. 
Case 2: Suppose $(a +b) \notin A$.  Then $(a+b) \in B$ and we reach a similar contradiction. $\Box$
