So $\gamma$ is continuous if and only if it is seqentially continuous, as $[0,1]$ is a metric space. At $x\in [0,1/2)$ or $(1/2,1]$, we can simply use the continuity of $\gamma_A$ and $\gamma_B$ respectively. The only delicate point is $x_0=1/2$. For $x_n\longrightarrow (1/2)^-$, we have $\lim \gamma(x_n)=\lim \gamma_A(2x_n)=\gamma_A(1)=\tilde{X}$.And for $x_n\longrightarrow (1/2)^+$, we have $\lim \gamma(x_n)=\lim \gamma_B(2x_n-1)=\gamma_B(0)=\tilde{X}$. I only remains to convince yourself that this suffices for the general case $x_n\longrightarrow 1/2$ to hold, which can be done by considering the possibly finite subsequences $x_n^+$ and $x_n^-$ of all $x_n$ greater than $1/2$ and less than $1/2$ respectively.
Now this was a tedious argument and certainly not the way we should do that. Here is a more general, purely topological fact, which makes everything easier to write. And which is the real reason behind this. The key fact is that the closed sets of a topology induced by a topological set $X$ on a closed subset $F$ are precisely the closed sets of $X$ contained in $F$. Note that this is false in general if $F$ is not closed. See the remninder below.
Lemma: let $f:X\longrightarrow Y$ be a function between two topological spaces. If there exist two closed sets $F_1,F_2$ in $X$ such that $X=F_1\cup F_2$ and both $f_1:=f_{|F_1}$ and $f_2:=f_{|F_2}$ are continuous for the induced topology on $F_1$ and $F_2$ respectively, then $f$ is continuous.
Remark: the same fact holds if you replace closed by open.
Proof: We will show that for every $F$ closed in $Y$, $f^{-1}(F)$ is closed in $X$, which is equivalent to the continuity of $f$. So take $F$ closed in $Y$ and observe
$$
f^{-1}(F)=f_1^{-1}(F)\cup f_2^{-1}(F).
$$
By assumption, each $f_j^{-1}(F)$ is closed in $F_j$ for the induced topology, i.e. there exists $G_j$ closed in $X$ such that $f_j^{-1}(F)=G_j\cap F_j$. Hence $f_j^{-1}(F)$ is a fortiori closed in $X$ and $f^{-1}(F)$ is the union of two closed sets, whence closed in $X$. QED.
Application: apply this to $f=\gamma$ on $X=[0,1]$ with $F_1=[0,1/2]$ and $F_2=[1/2,1]$.
Reminder: if $X$ is a topological space and $S$ is a subset of $X$. Then the topology induced by $X$ on $S$ is that where the open (resp. closed) sets all sets of the form $S\cap U$ (resp. $S\cap F$) for some $U$ open in $X$ (resp $F$ closed in $X$). These need not be open (resp. closed) in $X$ in general. As this would imply in particular that $S$ is open (resp. closed) in $X$.
For example, for $X=[0,1]$ and $S=[0,1/2)$, then $[0,1/2)$, like any $[1/2-1/n,1/2)$ is closed in $[0,1/2)$ for the induced toplogy. Indeed we can write $[1/2-1/n,1/2)=[0,1/2)\cap [1/2-1/n,1]$ as the intersection of $[0,1/2)$ by a closed set of $[0,1]$.