I was studying the proof of a proposition, which states the closure of tangent spaces under addition and scalar multiplication. The proof is straightforward for the most part, however, I can't seem to understand this application of differentiation across the composed functions. What follows is the complete proof.
Proof. Let $(U, x)$ be a chart on $M,$ with $U$ a neighbourhood of $p$. i) Define the curve $$ \sigma(t):=x^{-1}((x \circ \gamma)(t)+(x \circ \delta)(t)-x(p)) $$ Note that $\sigma$ is smooth since it is constructed via addition and composition of smooth maps and, moreover: $$ \begin{aligned} \sigma(0) &=x^{-1}(x(\gamma(0))+x(\delta(0))-x(p)) \\ &\left.=x^{-1}(x(p))+x(p)-x(p)\right) \\ =x^{-1}(x(p)) \\ &=p \end{aligned} $$ Thus $\sigma$ is a smooth curve through $p$. Let $f \in \mathcal{C}^{\infty}(U)$ be arbitrary. Then we have $$ \begin{aligned} X_{\sigma, p}(f) &:=(f \circ \sigma)^{\prime}(0) \\ &=\left[f \circ x^{-1} \circ((x \circ \gamma)+(x \circ \delta)-x(p))\right]^{\prime}(0) \end{aligned} $$ where $\left(f \circ x^{-1}\right): \mathbb{R}^{d} \rightarrow \mathbb{R}$ and $((x \circ \gamma)+(x \circ \delta)-x(p)): \mathbb{R} \rightarrow \mathbb{R}^{d},$ so by the multivariable chain rule $$ =\left[\partial_{a}\left(f \circ x^{-1}\right)(x(p))\right]\left(\left(x^{a} \circ \gamma\right)+\left(x^{a} \circ \delta\right)-x^{a}(p)\right)^{\prime}(0) $$ $=\left[\partial_{a}\left(f \circ x^{-1}\right)(x(p))\right]\left(\left(x^{a} \circ \gamma\right)^{\prime}(0)+\left(x^{a} \circ \delta\right)^{\prime}(0)\right)$ $=\left(f \circ x^{-1} \circ x \circ \gamma\right)^{\prime}(0)+\left(f \circ x^{-1} \circ x \circ \delta\right)^{\prime}(0)$ $=(f \circ \gamma)^{\prime}(0)+(f \circ \delta)^{\prime}(0)$ $=:\left(X_{\gamma, p} \oplus X_{\delta, p}\right)(f)$
Here lies my doubt: how does the third step follow from the second?
$$ =\left[\partial_{a}\left(f \circ x^{-1}\right)(x(p))\right]\left(\left(x^{a} \circ \gamma\right)+\left(x^{a} \circ \delta\right)-x^{a}(p)\right)^{\prime}(0) $$ $=\left[\partial_{a}\left(f \circ x^{-1}\right)(x(p))\right]\left(\left(x^{a} \circ \gamma\right)^{\prime}(0)+\left(x^{a} \circ \delta\right)^{\prime}(0)\right)$ $=\left(f \circ x^{-1} \circ x \circ \gamma\right)^{\prime}(0)+\left(f \circ x^{-1} \circ x \circ \delta\right)^{\prime}(0)$ $=(f \circ \gamma)^{\prime}(0)+(f \circ \delta)^{\prime}(0)$ $=:\left(X_{\gamma, p} \oplus X_{\delta, p}\right)(f)$
Here's a link to the original notes. It comes in Chapter 9, Proposition 9.2
It's not clear exactly what point you mean by "third step", but: the multivariable chain rule says that if $h:\mathbb{R}^d\to\mathbb{R}$ and $k:\mathbb{R}\to\mathbb{R^d}$, then the derivative of $h\circ k:\mathbb{R}\to\mathbb{R}$ at $0\in\mathbb{R}$ is given by $$ (h\circ k)'(0) = Dh(k(0))\cdot Dk(0) = \partial_ah(k(0))\, (k^a)'(0). $$ Now apply this with $h = f\circ x^{-1}$ and $k = x\circ \gamma + x\circ\delta - x(p)$ or $k=x\circ \gamma + x\circ\delta$ (depending on which step you mean).