[guided]We want to build a homotopy from $f_0$ to $f_2$ by "running $F$ first, then $G$". The idea is to traverse the first homotopy $F$ during $t \in [0, \tfrac{1}{2}]$ and the second homotopy $G$ during $t \in [\tfrac{1}{2}, 1]$, reparametrising each to run at double speed so they each occupy half the interval.
Concretely, define
\begin{align*}
H: [0,1] \times X &\to Y \\
(t, x) &\mapsto \begin{cases} F(2t, x) & 0 \le t \le \tfrac{1}{2}, \\ G(2t - 1, x) & \tfrac{1}{2} \le t \le 1. \end{cases}
\end{align*}
**Why is $H$ well-defined?** At the gluing point $t = \tfrac{1}{2}$, the first branch evaluates to $F(1, x) = f_1(x)$ and the second to $G(0, x) = f_1(x)$. These agree precisely because $F$ ends at $f_1$ and $G$ starts at $f_1$.
**Why is $H$ continuous?** This is where the [Pasting Lemma](/theorems/???) enters. The domain $[0,1] \times X$ is covered by the two closed sets $A = [0, \tfrac{1}{2}] \times X$ and $B = [\tfrac{1}{2}, 1] \times X$. On each piece, $H$ is continuous: on $A$ it is the composition $(t, x) \mapsto (2t, x) \mapsto F(2t, x)$ (both maps continuous), and on $B$ it is $(t, x) \mapsto (2t - 1, x) \mapsto G(2t - 1, x)$. Since $H|_A$ and $H|_B$ agree on the closed overlap $A \cap B = \{\tfrac{1}{2}\} \times X$, the pasting lemma guarantees that $H$ is continuous on all of $[0,1] \times X$.
Finally, $H(0, x) = F(0, x) = f_0(x)$ and $H(1, x) = G(1, x) = f_2(x)$, so $H$ is a homotopy from $f_0$ to $f_2$.[/guided]