Let $f : X \to Y$ and $g : Y \to Z$ and $h : Z \to W$ each be a D18: Map.
By definition, both compositions are maps $X \to Z$, so it remains to show that the values of both compositions coincide on each element of $X$. If $x \in X$, then
\begin{equation}
\begin{split}
(h \circ (g \circ f))(x)
= h((g \circ f)(x))
& = h(g(f(x))) \\
& = (h \circ g)(f(x))
= ((h \circ g) \circ f)(x)
\end{split}
\end{equation}
Hence, the claim is now a consequence of R1869: Characterisation of equality of maps. $\square$