I am reading "Analysis on Manifolds" by James R. Munkres.
Theorem 7.1. Let $A\subset\mathbb{R}^m$; let $B\subset\mathbb{R}^n$. Let $$f:A\to\mathbb{R}^n\,\,\,\,\,\,\text{and}\,\,\,\,\,\,g:B\to\mathbb{R}^p,$$ with $f(A)\subset B$. Suppose $f(a)=b$. If $f$ is differentiable at $a$, and if $g$ is differentiable at $b$, then the composite function $g\circ f$ is differentiable at $a$. Furthermore, $$D(g\circ f)(a)=Dg(b)\cdot Df(a),$$ where the indicated product is matrix multiplication.
Definition. Let $S$ be a subset of $\mathbb{R}^k$; let $f:S\to\mathbb{R}^n$. We say that $f$ is of class $C^r$ on $S$ if $f$ may be extended to a function $g:U\to\mathbb{R}^n$ that is of class $C^r$ on an open set $U$ of $\mathbb{R}^k$ containing $S$.
It follows from this definition that a composite of $C^r$ functions is of class $C^r$. Suppose $S\subset\mathbb{R}^k$ and $f_1:S\to\mathbb{R}^n$ is of class $C^r$. Next, suppose that $T\subset\mathbb{R}^n$ and $f_1(S)\subset T$ and $f_2:T\to\mathbb{R}^p$ is of class $C^r$. Then $f_2\circ f_1:S\to\mathbb{R}^p$ is of class $C^r$. For if $g_1$ is a $C^r$ extension of $f_1$ to an open set $U$ in $\mathbb{R}^k$, and if $g_2$ is a $C^r$ extension of $f_2$ to an open set $V$ in $\mathbb{R}^n$, then $g_2\circ g_1$ is a $C^r$ extension of $f_2\circ f_1$ that is defined on the open set $g_1^{-1}(V)$ of $\mathbb{R}^k$ containing $S$.
Let $U\subset\mathbb{R}^k$ be an open subset of $\mathbb{R}^k$.
Let $f_1:U\to\mathbb{R}^n$ be of class $C^1$.
Let $T\subset\mathbb{R}^n$ be a subset of $\mathbb{R}^n$.
Let $f_2:T\to\mathbb{R}^p$ be of class $C^1$.
Suppose that $f_1(U)\subset T$.
Let $g_2$ be a $C^1$ extension of $f_2$ to an open set $V$ in $\mathbb{R}^n$.
Then, $f_1$ is differentiable at any point $a\in U$.
Then, $g_2$ is differentiable at any point $b\in V$.
Then, $g_2\circ f_1$ is differentiable at any point $a\in U$ by Thereom 7.1.
Then, $D(g_2\circ f_1)(a)=Dg_2(b)\cdot Df_1(a)$ holds for any point $a\in U$, where $b=f_1(a)$.
Since $g_2\circ f_1=f_2\circ f_1$, $f_2\circ f_1$ is also differentiable at any point $a\in U$.
And $D(f_2\circ f_1)(a)=Dg_2(b)\cdot Df_1(a)$ holds for any point $a\in U$, where $b=f_1(a)$.
We assumed $f_2:T\to\mathbb{R}^p$ has a $C^1$ extension on an open set $V\supset T$ in $\mathbb{R}^n$.
To prove $f_2\circ f_1$ is differentiable on $U$, can we weaken this assumption?