Let f : x \to y and g : y \to z be compact morphisms in \mathsf{C}. Now let \omega : I \to x/\mathsf{C} be a filtered diagram in x/ \mathsf{C}, and consider a morphism \varphi : g \circ f \to \operatorname{colim} \omega in x/\mathsf{C}.
\begin{tikzcd}[ampersand replacement=\&]
x \& y \& z \\
\\
\&\& \bullet
\arrow["f", from=1-1, to=1-2]
\arrow["{\operatorname{colim} \omega}"', curve={height=30pt}, from=1-1, to=3-3]
\arrow["g", from=1-2, to=1-3]
\arrow["\varphi", from=1-3, to=3-3]
\end{tikzcd}
Since f is compact, the morphism \varphi \circ g : f \to \operatorname{colim} \omega factors through \omega(i_0) for some i_0 \in I. Let w_0 be the codomain of \omega(i_0), so that we have
\begin{tikzcd}[ampersand replacement=\&]
x \& y \& z \\
\& {w_0} \\
\&\& \bullet
\arrow["f", from=1-1, to=1-2]
\arrow["{\omega(i_0)}"{description}, from=1-1, to=2-2]
\arrow["{\operatorname{colim} \omega}"', curve={height=30pt}, from=1-1, to=3-3]
\arrow["g", from=1-2, to=1-3]
\arrow["\alpha", color={rgb,255:red,92;green,92;blue,214}, from=1-2, to=2-2]
\arrow["\varphi", from=1-3, to=3-3]
\arrow[from=2-2, to=3-3]
\end{tikzcd}
for some morphism \alpha. Now we consider the composition
\omega' := i_0/I \xrightarrow{i_0/\omega} \omega(i_0)/(x/\mathsf{C}) \xrightarrow{\omega(i_0)/\operatorname{cod}} w_0/\mathsf{C} \xrightarrow{\alpha^*} y/\mathsf{C}
which is a filtered diagram in y/C. Note that the following diagram commutes:
\begin{tikzcd}[ampersand replacement=\&]
{i_0/I} \& {\omega(i_0)/(x/\mathsf{C})} \& {w_0/\mathsf{C}} \& {y/\mathsf{C}} \\
I \&\&\& {x/\mathsf{C}}
\arrow["{i_0/\omega}"', from=1-1, to=1-2]
\arrow["{\omega'}"{description}, curve={height=-30pt}, from=1-1, to=1-4]
\arrow["\operatorname{cod}"', from=1-1, to=2-1]
\arrow["{\omega(i_0)/\operatorname{cod}}", from=1-2, to=1-3]
\arrow["\operatorname{cod}"', from=1-2, to=2-4]
\arrow["{\alpha^*}", from=1-3, to=1-4]
\arrow["{f^*}", from=1-4, to=2-4]
\arrow["\omega"', from=2-1, to=2-4]
\end{tikzcd}
Thus, by Lemma 4.9 we have
f^* \operatorname{colim} \omega' = \operatorname{colim}(f^* \circ \omega') = \operatorname{colim}(\omega \circ \operatorname{cod}),
and since I is filtered, the image of \operatorname{cod} : i_0/I \to I is a final subcategory of I. Overall, this gives
f^* \operatorname{colim} \omega' = \operatorname{colim} \omega,
and in particular we note \operatorname{cod} \operatorname{colim} \omega' = \operatorname{cod} (f^* \operatorname{colim} \omega') = \operatorname{cod} \operatorname{colim} \omega.
So, we have a diagram
\begin{tikzcd}[ampersand replacement=\&]
y \& z \\
\& \bullet
\arrow["g", from=1-1, to=1-2]
\arrow["{\operatorname{colim} \omega'}"', from=1-1, to=2-2]
\arrow["\varphi", from=1-2, to=2-2]
\end{tikzcd}
which we have not yet checked commutes. The commutativity is easy to check, however, because we know that \operatorname{colim} \omega' factors through \omega'(\operatorname{id}_{i_0}), i.e. the lower triangle in the commutative square
\begin{tikzcd}[ampersand replacement=\&]
y \& z \\
{w_0} \& \bullet
\arrow["g", from=1-1, to=1-2]
\arrow["{\omega(i_0)}"', from=1-1, to=2-1]
\arrow["{\operatorname{colim} \omega'}"{description}, from=1-1, to=2-2]
\arrow["\varphi", from=1-2, to=2-2]
\arrow[from=2-1, to=2-2]
\end{tikzcd}
commutes. Now, since g is a compact morphism in \mathsf{C}, we know that \varphi factors through \omega'(\gamma) for some \gamma \in i_0/I. We have \gamma : i_0 \to i_1 for some i_1 \in I; letting w_1 denote the codomain of \omega(i_1), we get
\begin{tikzcd}[ampersand replacement=\&]
x \& y \&\&\& y \&\& z \\
\& {w_0} \&\&\&\& {w_1} \\
\& {w_1} \&\&\&\&\& \bullet
\arrow["f", from=1-1, to=1-2]
\arrow["{\omega(i_0)}"{description}, from=1-1, to=2-2]
\arrow["{\omega(i_1)}"{description}, curve={height=12pt}, from=1-1, to=3-2]
\arrow["\alpha", from=1-2, to=2-2]
\arrow["{\omega'(\gamma)}", curve={height=-30pt}, from=1-2, to=3-2]
\arrow["g", from=1-5, to=1-7]
\arrow["{\omega'(\gamma)}"{description}, from=1-5, to=2-6]
\arrow["{\operatorname{colim} \omega'}"', curve={height=30pt}, from=1-5, to=3-7]
\arrow["\beta"', color={rgb,255:red,92;green,92;blue,214}, from=1-7, to=2-6]
\arrow["\varphi", from=1-7, to=3-7]
\arrow["{\omega(\gamma)}"{description}, from=2-2, to=3-2]
\arrow[from=2-6, to=3-7]
\end{tikzcd}
for some morphism \beta. Putting these diagrams together, we have
\begin{tikzcd}[ampersand replacement=\&]
x \&\& y \&\& z \\
\&\&\& {w_1} \\
\&\&\&\& \bullet
\arrow["f", from=1-1, to=1-3]
\arrow["{\omega(i_1)}"', from=1-1, to=2-4]
\arrow["{\operatorname{colim} \omega' \circ f}"', curve={height=24pt}, from=1-1, to=3-5]
\arrow["g", from=1-3, to=1-5]
\arrow["{\omega'(\gamma)}"{description}, from=1-3, to=2-4]
\arrow["\beta"', from=1-5, to=2-4]
\arrow["\varphi", from=1-5, to=3-5]
\arrow[from=2-4, to=3-5]
\end{tikzcd}
and we recall \operatorname{colim} \omega' \circ f = f^* \operatorname{colim} \omega' = \operatorname{colim} \omega. Thus, \beta factors \varphi through \omega(i_1). Since \varphi was arbitrary, we conclude that g \circ f is a compact morphism in \mathsf{C}, as desired.