That's the definition of "index-raising", as you say. The vector field $X$ comes from raising an index in the 1-form $\omega$ if and only if $\langle X, v\rangle = \omega(v)$ for all vectors $v$. This can actually be taken as the definition of index-raising, this is the coordinate-free one.
In definition 1.8 of the lecture notes, it is said that if $f\colon X \to Y$ is smooth and if $\varphi \colon U \to X$ and $\psi \colon V \to Y$ are local parametrisations in neighbourhoods of $x$ and $f(x)$, then
$$
df_x = d\psi_{\psi^{-1}(f(x))} \circ d(\psi^{-1}\circ f \circ \varphi)_{\varphi^{-1}(x)} \circ \big[(d\varphi_{\varphi^{-1}(x)})^{-1} \big]
$$
where $d\varphi_{\varphi^{-1}(x)}$ is considered as an isomorphism from $\Bbb R^n \to T_xX$, that is, forgeting about the ambiant euclidean space $\Bbb R^N$ around $X$.
Same thing with $g$ at the point $f(x)$ gives
$$
dg_{f(x)} = d\eta_{\eta^{-1}(g(f(x)))} \circ d(\eta^{-1}\circ g \circ \psi)_{\psi^{-1}(f(x))} \circ \big[(d\psi_{\psi^{-1}(f(x))})^{-1} \big]
$$
where $d\psi_{\psi^{-1}(f(x))}$ is considered as an isomiorphism from $\Bbb R^{\tilde{n}} \to T_{f(x)}Y$, that is, forgeting about the ambiant euclidean space $\Bbb R^{\tilde{N}}$ around $Y$.
For $g\circ f$, it yields
$$
d(g\circ f)_{g(f(x))} = d\eta_{\eta^{-1}(g(f(x)))} \circ d(\eta^{-1}\circ (g\circ f) \circ \varphi)_{\varphi^{-1}(x)} \circ \big[(d\varphi_{\varphi^{-1}(x)})^{-1} \big]
$$
You are thus lead to show that
$$
d(\eta^{-1}\circ (g\circ f) \circ \varphi)_{\varphi^{-1}(x)}= \big(d(\eta^{-1}\circ g \circ \psi)_{\psi^{-1}(f(x))}\big)\circ\big( d(\psi^{-1}\circ f \circ \varphi)_{\varphi^{-1}(x)}\big)
$$
This is just the chain-rule applied to the composition of
$$
\psi^{-1}\circ f \circ \varphi \colon U \subset \Bbb R^n \to V \subset \Bbb R^{\tilde{n}}
$$
and
$$
\eta^{-1}\circ g\circ \psi \colon V \subset \Bbb R^{\tilde{n}} \to W \subset \Bbb R^{\tilde{\tilde{n}}}
$$
which are smooth functions defined on and with range in open subsets of euclidean spaces.
By the way: there is an obvious typo in the author's sketch: the arrow of at bottom right corner should be $\eta^{-1}\circ g \circ \psi$, not $\eta^{-1}\circ f \circ \psi$.
Best Answer
Let's use the definition of gradient as the vector field equivalent to the differential: given $x \in M$ and $v \in T_xM$, we have $$g_x(\nabla(f\circ s)(x),v) = {\rm d}(f\circ s)_x(v) = {\rm d}f_{s(x)}({\rm d}s_x(v)) = g_{s(x)}(\nabla f(s(x)), {\rm d}s_x(v)) = g_x(({\rm d}s_x)^\top \nabla f(s(x)), v),$$so that $$\nabla(f\circ s)(x) = ({\rm d}s_x)^\top \big(\nabla f(s(x))\big),$$where $({\rm d}s_x)^\top \colon T_{s(x)}M \to T_xM$ is the adjoint map of ${\rm d}s_x\colon T_xM \to T_{s(x)}M$, characterized by the relation $$g_{s(x)}({\rm d}s_x(v), w) = g_x(v,({\rm d}s_x)^\top(w)), \qquad \forall\,v \in T_xM, \quad \forall\,w \in T_{s(x)}M.$$