Composition of a differential map and a smooth map In DoCarmo’s Riemannian Geometry book, it is written that if $\phi$ is a smooth map from $M$ to $M$, $v\in T_pM$, and f is a real-valued smooth map in a neighborhood of $\phi(p)$, then we have $(d\phi(v)f)\phi(p)=v(f\circ \phi)(p)$.
In this book, a tangent vector $v$ at $p$ is defined as a mapping of the set of real-valued smooth maps at p to $\mathbb R$.
With those definitions and notations, the equality above does not make sense, since for example $(d\phi(v)f)$ is already a real number, not a function, so $(d\phi(v)f)\phi(p)$ is wrong. So what does the author mean?
Appendix: this remark exactly in this form is used in proving $[X,Y](p)=lim_{t\rightarrow 0}1/t\times(Y-d\phi_t Y)(\phi_t(p))$. Hence additionally I could not understand the left side of this equality.
 A: You are correct. If $v \in T_pM$, the expression $d\phi(v) f$ is a real number. 
But the expression "$(d\phi(v)f)(\phi(p))$" has a problem, even if $v$ is a vector field: What is "$d\phi(v)$"? This is not necessarily well-defined as a vector field on $M$ if $\phi$ is just smooth. Luckily it is in the case that $\phi$ is a diffeomorphism. These things also make sense when $\phi$ is a local diffeomorphism, but then you have vector fields defined on some open set $U$ and, accordingly, $\phi(U)$. (In particular, it makes sense in the context of Lemma 5.5.)
As you mention, DoCarmo later uses the expression in the proof of another proposition:

(...) Accordingly,
$((d\varphi_tY)f)(\varphi_t(p))=(Y(f \circ \varphi_t))(p)$ (...)

(For context, here $\varphi_t$ is a local flow.) Therefore, as far as what he seems to be  interested in is concerned, there is no problem in correcting his equality by saying that $v$ should be a vector field.
For more information, see the wikipedia section on pushforward of vector fields, for example.
