Follow these steps to prove the Chain Rule: (i) show that $h: A \to \mathbb{R}$ is differentiable at $a\in A$ iff there's an $l:A \to \mathbb{R}$ that is continuous at $a$ and s.t. $h(x)-h(a)=l(x)(x-a)$ for all $A$, and then (ii) use this criterion to prove the Chain Rule.
$\implies)$ If $h$ is differentiable at $a$, then we can define $l$ as follows
$$l(x)= \begin{cases} \frac{h(x)-h(a)}{x-a} & \text{if } x\neq a \\ h'(a) & \text{otherwise} \end{cases}$$
Why? Because the difference quotient is defined (the numerator is defined in $A \setminus \{a\}$ and the denominator is never zero there) and $h$ is differentiable at $a$, so $h'(a)$ is also defined. Notice that $l$ verifies the identity $h(x)-h(a)=l(x)(x-a)$ for all $x\in A$ and that $l$ is continuous at $a$ by construction.
$\Longleftarrow)$ If $f$ is as defined and continuous at $a$, then $\lim_{x\to a} \frac{h(x)-h(a)}{x-a}=h'(a)$, which means that $h$ is differentiable at $a$.
Moving on, we now prove the Chain Rule. Let $f:A\to \mathbb{R}$, $g:B\to \mathbb{R}$, $f(A) \subset B$, so that $g \circ f$ is defined. If $f$ is differentiable at $a \in A$ and $g$ is differentiable at $f(a) \in B$, we'd like to prove that $(g\circ f)'(a)$ exists and is s.t. $(g\circ f)'(a)=g'(f(a))f'(a)$.
$$\lim_{x\to a} \frac{(g \circ f) (x) - (g \circ f) (a)}{x-a} = \lim_{x\to a} \frac{g(f(x)) - g(f(a))}{x-a}$$
We know that there's an $l_0 : B\to \mathbb{R}$ s.t.
$$l_0 (x) \begin{cases} \frac{g(x)-g(f(a))}{x-f(a)} & \text{if } x\neq f(a) \\ g'(f(a)) & \text{otherwise} \end{cases}$$
Which means that in a neighborhood $D_{\delta}(f(a)) \setminus \{f(a)\} \subset B$ we have $g(x)=l_0 (x)(x-f(a)) + g(f(a))$.
$$\lim_{x\to a} \frac{l_0(f(x))(f(x)-f(a)) + g(f(a)) - g(f(a))}{x-a} = \lim_{x\to a} l_o(f(x))\frac{f(x)-f(a)}{x-a} = g'(f(a))f'(a)$$