Theorem 8.5 (The chain rule) from "An introduction to manifolds" by Tu - How should I understand the notation $(...)f$ where $f$ is a smooth function?

If the definition of $T_pN$ is the equivalence class of curves, then the pushforward $F_{*,p}: T_pN \to T_{F(p)}M$ is given by composition: If $X_p = [\gamma]$ (where $[\gamma]$ denotes the equivalence class which contains $\gamma$), then $$ F_{*, p} X_p = [F\circ \gamma].$$ Note that $F\circ \gamma$ is a curve at $F(p)$, so $[F\circ \gamma]\in T_{F(p)}M$.

Taking this definition, chain rule is just a consequence of function compositions: \begin{align} (G\circ F)_{*,p} X_p &= (G\circ F)_{*,p} [\gamma] \\ &= [(G\circ F)\circ \gamma] \\ &= [G\circ (F\circ \gamma)] \\ &= G_{*, F(p)} [F\circ \gamma] \\ &= G_{*, F(p)} F_{*,p}[\gamma] \\ &=G_{*, F(p)} F_{*,p} X_p. \end{align}

In the text, they take a different definition of $T_pN$ as derivation. Using your definition, for each $v=[\gamma] \in T_pN$, one can define a linear map $D_v : C^\infty(M) \to \mathbb R$ by

$$ D_v f : = \frac{d}{dt}\bigg|_{t=0} (f\circ \gamma)(t). $$

There is a space $\mathscr D_pN $ of derivation at $p$, where each $X\in \mathscr D_pN $ is a linear map $X : C^\infty (N) \to \mathbb R$ which satisfies the product rule $$X(fg) = f(p) Xg + g(p) Xf.$$ It turns out that the map $v = [\gamma] \mapsto D_v$ is a one to one correspondence between $T_pN$ and $\mathscr D_pN$.

Under this correspondence $T_pN \Leftrightarrow \mathscr D_pN$ let's see how the pushforward $w = F_{*,p}v$ acts on functions: let $v= [\gamma]$. Then $$ w = F_{*,p}[ \gamma] = [F\circ\gamma]$$ and thus for each $g\in C^\infty (M)$,
\begin{align} D_w g &= \frac{d}{dt}\bigg|_{t=0} (g \circ (F\circ \gamma)) (t) \\ &=\frac{d}{dt}\bigg|_{t=0}((g \circ F)\circ \gamma)) (t)\\ &= D_v (g\circ F). \end{align}

That is, for each $X\in \mathscr D_pN$, the pushforward $X : \mathscr D_p N \to \mathscr D_{F(p)} M$ is defined by $$ (F_{*,p} X)g = X( F\circ g).$$

To sum up, when you think of $X \in T_pN$ as equivalence class of curves, then $Xg$ really means (1) sending $X$ to $D_X$, and (2) $Xf := D_Xf$

In Tu's book, $\mathscr D_pN$ IS the definition of tangent space (and they just denote it as $T_pN$). Thus the confusion.