Let $I_1 = [a,b], I_2 = [b,c] \subseteq \mathbb{R}$ be two intervals with $a \lt b \lt c$ and $f_1: I_1 \to \mathbb{R}$ and $f_2 : I_2 \to \mathbb{R}$ two continuous functions. Show that the function
$$f: [a,c] \to \mathbb{R},\quad f(x) = \begin{cases} f_1(x) & \text{if } x\in [a,b) \\ f_2(x) & \text{if } x \in [b,c] \end{cases}$$
is continuous if and only if $f_1(b) = f_2(b)$.
How can I prove this without using limits and just with the definition of continuity?
I have distinguished three different for which I need to show that $f$ is continuous: 1. $x_0 \in I_1$ and $x \lt b$, 2. $x_0 \in I_2$ and $x \gt b$, 3. $x_0 = b$. For 1. and 2. is it enough to say that $f_i$ is continuous? For case 3. I am unclear how to actually show this.
Suppose that $f_1(b)\neq f_2(b)$; I will prove that $f$ is discontinuous; more precisely, I will prove that it is discontinuous at $b$. Let $\varepsilon=\frac{\bigl|f_1(b)-f_2(b)\bigr|}2$. Then $\varepsilon>0$. Let $\delta>0$. Since $f_1$ is continuous at $b$, there is a $y\in(b-\delta,b)\cap[a,b)$ such that $\bigl|f_1(b)-f_1(y)\bigr|<\varepsilon$. But then\begin{align}\bigl|f(b)-f(y)\bigr|&=\bigl|f_2(b)-f_1(y)\bigr|\\&=\bigl|f_2(b)-f_1(b)-\bigl(f_1(y)-f_1(b)\bigr)\bigr|\\&\geqslant2\varepsilon-\varepsilon\\&=\varepsilon.\end{align}So, $f$ is discontinuous at $b$.
Suppose now that $f_1(b)=f_2(b)$. It is clear that, in order to prove that $f$ is continuous, all that is needed is to prove that $f$ is continuous at $b$. Take $\varepsilon>0$. Now, take $\delta_1,\delta_2>0$ such that$$|x-b|<\delta_1\wedge x\in[a,b]\implies\bigl|f_1(x)-f_1(b)\bigr|<\varepsilon$$and that$$|x-b|<\delta_2\wedge x\in[b,c]\implies\bigl|f_2(x)-f_2(b)\bigr|<\varepsilon.$$Let $\delta=\min\{\delta_1,\delta_2\}$. If $x\in[a,c]$ and $|x-b|<\delta$, then