Explanation of use of chain rule I'm reading An Introduction to Manifolds by Loring W. Tu and I'm not sure how the chain rule is used in the one of it's first equations. It goes as follows:

By the chain rule,
$$\frac{d}{dt}f(p+t(x-p))=\sum (x^i-p^i)\frac{\partial f}{\partial x^i}(p+t(x-p)).$$

To me, it looks like the summand is of the form $\frac{dl}{dt}\frac{\partial f}{\partial x^i}$, where $l=p+t(x-p)$, rather than $\frac{df}{dl}\frac{dl}{dt}$, which makes more sense to me. Where am I going wrong in my thinking?  Thanks!
 A: First of all, it does look to me that the author has introduced a clash of variables by having both $x$ in the formula $x + t(x-p)$ and $x^i$ in the formula $\frac{\partial f}{\partial x^i}$. 
So I agree with your assessment of introducing a vector valued variable $l=(l^1,...,l^n)$ as the "middle variable" of the chain rule. That variable should be used as an independent variable for $f=f(l)$, and as a dependent variable where $l^i = l^i(t) = p^i + t(x^i - p^i)$.
Using $l$, the summand in Tu's formula becomes $\displaystyle\frac{dl^i}{dt} \cdot \frac{\partial f}{\partial l^i}$, not $\displaystyle\frac{dl}{dt} \frac{\partial f}{\partial x^i}$ as suggested in your post. I prefer writing it in the other order as $\displaystyle\frac{\partial f}{\partial l^i} \cdot \frac{dl^i}{dt}$.
The chain rule formula as a whole can then be written as a dot product
\begin{align*}
\frac{df}{dt} &= \sum_{i=1}^n \frac{\partial f}{\partial l^i} \cdot \frac{dl^i}{dt} \\
&= \underbrace{\left(\frac{\partial f}{\partial l^1},...,\frac{\partial f}{\partial l^n}\right)}_{\displaystyle=\frac{df}{dl}} \cdot \underbrace{\left(\frac{dl^1}{dt},...,\frac{dl^n}{dt}\right)}_{\displaystyle=\frac{dl}{dt}} 
\end{align*}
(The comment of @copper.hat is more formally correct, treating $\frac{df}{dl}$ as a linear transformation in the form of an $n \times 1$ matrix, and treating the chain rule as a matrix multiplication formula; but I wanted to write it this way to lay out in detail the role of $l$ and its components).
In general, the derivative symbols that we make up are really just shorthands for some more formal expression, even the symbol $\frac{dy}{dx}$ for the ordinary derivative. In this case the derivative symbol $\frac{df}{dl}$, with a real valued symbol $f$ in the numerator and a vector valued symbol $l$ in the denominator, is just a shorthand for a vector of ordinary partial derivative symbols $(\frac{\partial f}{\partial l_1},...,\frac{\partial f}{\partial l_n})$, where $l_1,...,l_n$ are independent real valued variables.  = p_i + t (x_i-p_i)$.
So, to address your question in the comments, $\frac{dl}{dt}$ has the value given above because that's what its value has to be in order that one can write the chain rule in shorthand as
$$\frac{df}{dt} = \frac{df}{dl} \frac{dl}{dt}
$$
And, referring again to the "clash of variables" issue, I don't think the terms in the formula for $\frac{df}{dl}$ should be $\frac{\partial f}{\partial x^i}$, then should instead by $\frac{\partial f}{\partial l^i}$.
