Constructing a homotopy in a square Let $F:I\times I\to X$ be continuous, $\alpha, \beta,\gamma, \delta$ be paths in $X$ as below
Thus, $\alpha(t)=F(t,0), \beta(t)=F(t,1),\gamma(t)=F(0,t), \delta(t)=F(1,t)$. Then it is to be proven that $\alpha\simeq \gamma\circ\beta\circ \delta^{-1}$ rel {0,1}. Here $\circ$ represents concatenation of maps.
So here, I want a continuous $G:I\times I\to X, G(x,0)=\alpha(x), G(x,1)=\gamma\circ\beta\circ \delta^{-1}(x)$ for all $x\in I$.
I have no idea how to construct this $G$.
Here is a solution that I found online. The homotopy which they propose in the solution is the following:
$H(x,t)=\begin{cases}F(0,4tx): x\le \frac 14\\
F(4x-1,t):\frac 14\le x\le \frac 12\\
F(1,2t(1-x)): x\ge \frac 12\end{cases}$
Here, $H(1/4, t)=F(0,t)=\gamma(t), H(1/2,t)= F(1,t)=\delta(t)$. I don't understand when $H$ 'hits' $\beta$.
I don't understand how to come up with the desired homotopy.
There is an answer here as well.
They define $H(s,t)$ by,
$$
H(s,t)=
\begin{cases}
F(s-st,3st)=\gamma &\text{for } s\in[0,1/3],t\in[0,1] \\
F((1+2t)(s-\frac{1}{3}t),t)=\beta &\text{for } s\in[1/3,2/3],t\in[0,1]\\
F(t-(st-s),t-3(s-2/3)t)=\delta^{-1} &\text{for } s\in[2/3,1],t\in[0,1] 
\end{cases}$$
But I don't understand why $F(s-st,3st)=\gamma $ is true as $\gamma(t)=F(0,t)$, that is, the equality holds only if $s-st=0
$.
Can anyone please suggest me how to construct the homotopy step by step or give an idea to do so? Hints are also welcome. Thanks.
Edit: I drew some pictures but unfortunately, it is still not clear to me how how to construct the homotopy. In the image attached below, I divided the interval $I$ into three parts for $s$. But here $\gamma$ does not have anything to be homotopic to: I mean that it would be better if there was a map with starting and end points same as those of $\gamma$ so that some homotopy could be thought of between the same. Here it is not so.

I found an another example with solution but here also I don't understand how they have written the homotopy $H$:

Here $c_p$ represents the constant map at $p$ (that is, it takes I to p in X). It is to be shown here that $f\simeq c_p\circ f$. Using this picture, they defined $H(s,t)=\begin{cases}p; t\ge 2s\\ f(\frac{2s-t}{2-t}); t\le 2s\end{cases}$. I have no idea how they defined $H(s,t)$ for the case $t\le 2s$ using the picture. How does the picture help here?
PS: A closely related result can be found as lemma 7.12 in Lee's book but it was left as an exercise there.
 A: The answer due to Kevin. S. is maybe a bit confusing.
When they say: "$=\gamma$" they do not mean, there is literally equality for all $s,t$ with $\gamma(s)$. Rather, they are indicating, for visual structure, conceptual clarity, which "pieces" of $H$ correspond to the "pieces" of $\phi=\delta^{-1}\cdot\beta\cdot\gamma$. Because, at time $t=1$, $H(s,1)=F(s-s(1),3s(1))=F(0,3s)=\gamma(3s)=\phi(s)$ on the interval $s\in[0,1/3]$. They are doing the same thing for $\beta, \delta^{-1}$.
Now for the first question.

I don't understand when $H$ 'hits' $\beta$

Notice that for $x\in[1/4,1/2]$, $H(x,1)=F(4x-1,1)=\beta(4x-1)$. This is an accelerated, $4\times$ speed, run through $\beta$. Their $H$ is not strictly a homotopy between $\alpha$ and $\delta^{-1}\beta\gamma$ but just a demonstration that $[\alpha]=[\delta^{-1}\beta\gamma]$. $H(x,0)$ isn't $\alpha$, but is homotopic to $\alpha$: it dawdles for a few moments at $\alpha(0)$, then leaps forward along $\alpha$ at $4\times$ speed to $\alpha(1)$, and then lollygags some more. Compositing $H$ with some other straightforward homotopies will give a direct homotopy $\alpha\simeq\delta^{-1}\beta\gamma$, though.
How do we come up with $H$? Well, initially we want $\alpha$ - we want to run along the bottom edge of the square, and then apply $F$. Finally, we want to run along the outer edges of the square, and then apply $F$. Intuitively, as depicted below, their $H$ is sliding up the square. The red and purple paths are typical paths in the square (to be interpreted in $X$ after applying $F$). You can think of the coloured crossbars as things you can slide upwards (indicated by the black $\implies$ arrow) all the way until you reach $\beta$ at the top. We run up the left hand side, sprint along the crossbars, then fall down the right hand side. The homotopy is just the variation of this crossbar. This is one of many ways to intuitively create such a homotopy: all you need to do is visually imagine sliding from one place to the other, and then think about writing that down in concrete mathematics.

A: Here is the function I was trying to describe in chat.
Define
$$
\begin{align}
f(t)&=G(t,0)=(t,0)&&\text{if }0\le t\le1\tag{1a}\\
g(t)&=G(t,1)=(0,3t)&&\text{if }0\le t\le\tfrac13\tag{1b}\\
g(t)&=G(t,1)=(3t-1,1)&&\text{if }\tfrac13\le t\le\tfrac23\tag{1c}\\
g(t)&=G(t,1)=(1,3-3t)&&\text{if }\tfrac23\le t\le1\tag{1d}
\end{align}
$$
then
$$
\begin{align}
&f:[0,1]\leftrightarrow\alpha\tag{2a}\\
&g:\left[0,\tfrac13\right]\leftrightarrow\gamma\tag{2b}\\
&g:\left[\tfrac13,\tfrac23\right]\leftrightarrow\beta\tag{2c}\\
&g:\left[\tfrac23,1\right]\leftrightarrow\delta^{-1}\tag{2d}
\end{align}
$$
Finally, define
$$
G(t,s)=(1-s)f(t)+sg(t)\tag3
$$
Here is $G(t,s)$ as $s$ cycles from $0$ to $1$ and back:

