[guided]We must prove that $h$ satisfies exactly the definition assigned to $\gcd(a,b,c)$ in the theorem statement. There are two requirements: first, $h$ must divide all three integers $a,b,c$; second, every common divisor of $a,b,c$ must divide $h$.
For the first requirement, use the two binary gcd definitions in sequence. Since $h=\gcd(g,c)$, we have
\begin{align*}
h \mid g
\end{align*}
and
\begin{align*}
h \mid c.
\end{align*}
Since $g=\gcd(a,b)$, we have
\begin{align*}
g \mid a
\end{align*}
and
\begin{align*}
g \mid b.
\end{align*}
The relation $h \mid g$ and $g \mid a$ implies $h \mid a$ by transitivity of divisibility in $\mathbb{Z}$; similarly, $h \mid g$ and $g \mid b$ imply $h \mid b$. Together with $h \mid c$, this proves that $h$ is a common divisor of $a,b,c$.
For the second requirement, take an arbitrary integer $r \in \mathbb{Z}$ such that $r \mid a$, $r \mid b$, and $r \mid c$. Because $r$ divides both $a$ and $b$, the defining greatest-divisor property of $g=\gcd(a,b)$ gives
\begin{align*}
r \mid g.
\end{align*}
Together with $r \mid c$, this says that $r$ is a common divisor of $g$ and $c$. Applying the defining greatest-divisor property of $h=\gcd(g,c)$ gives
\begin{align*}
r \mid h.
\end{align*}
Thus every common divisor of $a,b,c$ divides $h$, which is the key maximality condition for the three-term gcd.[/guided]