In Guillemin and Pollack's "Differential Topology" on p. 134, there is a definition of the pullback of a vector field $v:X\rightarrow \mathbb{R}^k$, given as $\phi^*v(u):=d\phi^{-1}_u v(\phi(u))$ where $\phi:U\subset\mathbb{R}^k\rightarrow X$ is a diffeomorphic parameterisation of a subset of the $k$-dimensional manifold $X$ and $v(x)\in T_x(X)$.
Later on p. 140, one is asked to derive that \begin{equation} \phi^*\text{grad}(f)=\sum_{i,j=1}^k \frac{\partial(f\circ\phi)}{\partial x_i}g^{ij}e_j,\qquad g_{ij}(u):=\langle d\phi_u(e_i),d\phi_u(e_j)\rangle, \end{equation} where $\langle \cdot,\cdot\rangle$ denotes the scalar product and $\text{grad}(f)$ is defined by the relation $df_x(w)=\langle\text{grad}(f)(x),w\rangle$, i.e. $df_x=\langle \text{grad}(f)(x),\cdot\rangle$. ($\{e_1,\cdots,e_k\}$ denotes the standard basis of Euclidean space.)
I hope to receive some support in doing that.
What I thought about: \begin{equation*} \begin{split} &\langle\phi^*\text{grad}(f)(u),e_j\rangle =\langle d\phi^{-1}_{u} (\text{grad}(f)(\phi(u))),e_j\rangle \end{split} \end{equation*} and \begin{equation*} \begin{split} &\sum_{i,j=1}^k \frac{\partial(f\circ\phi)(u)}{\partial x_i}g_{ij}(u)e_j =\sum_{i,j=1}^k d(f\circ\phi)_u(e_i)g_{ij}(u)e_j =\sum_{i,j=1}^k df_{\phi(u)}d\phi_u(e_i)\langle d\phi_u(e_i),d\phi_u(e_j)\rangle e_j \end{split} \end{equation*} but I just don't know how to get these expressions together. Help would be appreciated.