If $\mathbf f : \mathbb R^n \to \mathbb R^m$ is differentiable at $x_0 \in \mathbb R^n$, define the differential operator $$d\mathbf f_{x_0} : \mathbb R^n \to \mathbb R^m $$ as the linear operator that takes a small increment $h \in \mathbb R^n$ and outputs $D\mathbf f(x_0) \cdot h$, where $D\mathbf f(x_0) \in \operatorname {Mat}(m\times n,\mathbb R)$ is the Jacobian matrix of $\mathbf f$ at the point $x_0$.
Let $\mathbf f$ be defined as before, and let $\mathbf g : \mathbb R^p \to \mathbb R^q$ be differentiable at $y_0 \in \mathbb R^p$. Call $a_0 \doteq \mathbf f(x_0)$ and $b_0 \doteq \mathbf g(y_0)$. Lastly, let $\mathbf h : \mathbb R^m \times \mathbb R^q \to \mathbb R^s$ be differentiable at $(a_0,b_0)$. How would I write down the differential $d\mathbf s_{(x_0,y_0)}$ of function $\mathbf s : \mathbb R^n \times \mathbb R^p \to \mathbb R^s$ defined as follows, $$\mathbf s : (x,y) \mapsto \mathbf h(\mathbf f(x),\mathbf g(y)) $$ as a composition of the differentials $d\mathbf h_{(a_0,b_0)}$, $d\mathbf f_{x_0}$, and $d\mathbf g_{y_0}$?
I know that the Jacobian matrix associated to $d\mathbf s_{(x_0,y_0)}$ should be in $\operatorname{Mat}(s \times pq, \mathbb R)$, but I'm not exactly sure what matrices need be multiplied together to construct it. I guess my brain is having a hard time understanding how to "merge" two functions such as $\mathbf f$ and $\mathbf g$ in an ordered couple, so I can't compile my composition diagram correctly.