How to use chain rule in this equation? Source: Prof. Meinrenken's  notes on Differential Geometry, page No 72:

Theorem $4.1$. let $(U,\varphi)$ be  a  coordinate  chart  around  $p$.A linear map $v :C^{\infty}(M) \to \mathbb{R}$  is in $T_pM$ if and  only  if it  has  the  form $$v(f)=\sum_{i=1}^{m} a^i\frac{\partial(f \circ \varphi^{-1})}{\partial u^i}|_{u=\varphi(p)}$$  for some $a=(a^1,.....,a^m)\in \mathbb{R}^m$
Proof: Given a linear  map v of this form.Let $\bar{\gamma}: \mathbb{R} \to \varphi(U)$  be  a curve  with  $\bar\gamma(t)=\varphi(p) +ta $ for $|t|$  suffiently  small .Let $\gamma = \varphi^{-1} \circ \bar\gamma$.Then
$$\frac{d}{dt}|_{t=0} f(\gamma(t))=\frac{d}{dt}|_{t=0}(f\circ \varphi^{-1})(\varphi(p) +ta)=\sum_{i=1}^{m} a^i\frac{\partial(f \circ \varphi^{-1})}{\partial u^i}|_{u=\varphi(p)} $$
by chain rule

My confusion:How to use   chain rule  in this equation
why $$\frac{d}{dt}|_{t=0}(f\circ \varphi^{-1})(\varphi(p) +ta)=\sum_{i=1}^{m} a^i\frac{\partial(f \circ \varphi^{-1})}{\partial u^i}|_{u=\varphi(p)} ?$$
I know  that chain rule mean
$$\frac{\partial (f \circ F)}{\partial x^i} =\sum_{j=1}^m\frac{\partial f}{\partial y^j}\frac{\partial F^j}{\partial x^i}.$$
where $f:V\to\Bbb R$ on an open set $V\subseteq\Bbb R^m$, with its partial derivative with respect to the $j$-th coordinate denoted $\frac{\partial f}{\partial y^j}$.
and  $F:U\to V$ on an open set $U\subseteq\Bbb R^n$, with its $j$-th component function's partial derivative with respect to the $i$-th coordinate denoted $\frac{\partial F^j}{\partial x^i}$.
My attempt: $$\frac{d}{dt}|_{t=0}(f\circ \varphi^{-1})(\varphi(p) +ta)=\frac{d}{dt}|_{t=0}((f\circ \varphi^{-1})(\varphi(p))  + (f\circ \varphi^{-1})ta)=\frac{d}{dt}|_{t=0}((f(p))  + (f\circ \varphi^{-1})ta) $$
After  that Im not able to proceed further
 A: You wrote

$$ \frac{d}{dt}|_{t=0}(f\circ \varphi^{-1})(\varphi(p) +ta)=\frac{d}{dt}|_{t=0}((f\circ \varphi^{-1})(\varphi(p))  + (f\circ \varphi^{-1})ta)=\dots$$

This step is assuming e.g. linearity of $f\circ \varphi^{-1}$ which is not known.
You just need to apply your stated version of chain rule for differentiating $f\circ F$, replacing $f$ with $f\circ \varphi^{-1}$, and putting $F(t)=\gamma(t)=\phi(p)+ta$.
A: Assume $\space\gamma:[0,1] \rightarrow M$ such that $\gamma(0)=p$. Then we can take the derivative of some function $f \in C^{\infty}(M)$ along the curve $\gamma$ at $p$ thusly...
$${d\over dt}(f\circ \gamma)|_{0}={d\over dt}(f\circ \varphi^{-1}\circ \varphi\circ \gamma)|_{0}$$
$$=\partial_i(f\circ \varphi^{-1})|_{\varphi(p)} \cdot {d\over dt}(\varphi^i \circ\gamma)|_{0}$$
Although it may look unfamiliar, the term on the left is the partial derivative with respect to the component functions of your chart map $\varphi$. So we have;
$${d\over dt}(f\circ \gamma)|_{0}= {d\over dt}(\varphi^i \circ\gamma)|_{0}\cdot {{\partial f}\over{\partial \varphi^{i}}}\bigg|_{\varphi(p)}$$
Letting $a^i = {d\over dt}(\varphi^i \circ\gamma)|_{0}$ gives us the decomposition of the vectors $v \in T_pM$ with respect to a basis of partial differential operators.
$$v(f)={d\over dt}(f\circ \gamma)|_{0}=\bigg(\sum_{i=1}^{m}a^i\cdot{{\partial }\over{\partial \varphi^{i}}}\bigg|_{\varphi(p)}\bigg)(f) $$
