This is a problem and solution from Spivak's Calculus. I'm trying to fill in the details of the final paragraph in the solution, to prove the conclusion in problem (c).
Problem:
$\rm(b)$ Suppose that $\{b_n\}$ is nonincreasing, with $b_n\geq0$ for each $n$, and that $$m\leq a_1+\cdots+a_n\leq M$$ for all $n$. Prove Abel's Lemma: $$b_1m\leq a_1b_1+\cdots+a_nb_n\leq b_1M.$$ (And, moreover, $$b_km\leq a_kb_k+\cdots+a_nb_n\leq b_kM,$$ a formula which only looks more general, but really isn't.)
$\rm(c)$ Let $f$ be integrable on $[a,b]$ and let $\phi$ be nonincreasing on $[a,b]$ with $\phi(b)=0$. Let $P=\{t_0,\ldots,t_n\}$ be a partition of $[a,b]$. Show that the sum $$\sum_{i=1}^n f(t_{i-1})\phi(t_{i-1})(t_i-t_{i-1})$$ lies between the smallest and the largest of the sums $$\phi(a)\sum_{i=1}^k f(t_{i-1})(t_i-t_{i-1}).$$ Conclude that $$\int_a^b f(x)\phi(x)\,dx$$ lies between the minimum and the maximum of $$\phi(a)\int_a ^xf(t)\,dt,$$ and that it therefore equals $\phi(a)\displaystyle\int_a^\xi f(t)\,dt$ for some $\xi$ in $[a,b]$.
Solution:
$(\rm c)$ If we set $$a_i=f(x_i)(t_i-t_{i-1})$$ and let $$\begin{align}m&=\text{smallest of the }\sum_{i=1}^k f(x_i)(t_i-t_{i-1})\\M&=\text{largest of the }\sum_{i=1}^k f(x_i)(t_i-t_{i-1})\end{align}$$ then $m\leq a_1+\cdots+a_k\leq M$ for all $k$. Letting $b_k=\phi(x_k)$ in part $\rm(b)$, we find that $$\sum_{i=1} ^n f(x_i)\phi(x_i)(t_i-t_{i-1})$$ lies between the smallest and the largest of the sums $$\phi(x_1)\sum_{i=1}^k f(x_i)(t_i-t_{i-1}).$$ $\,\,\,$ Since we can approximate $\int_a^b f(x_i)\phi(x)\,dx$ by sums $\sum\limits_{i=1}^n f(x_i)\phi(x_i)(t_i-t_{i-1}),$ and $\int_a^x f(t)\,dt$ by sums like $\sum\limits_{i=1}^k f(x_i)(t_i-t_{i-1})$, the final result should follow from the above. However, some care is required for the argument: $\,\,\,$ Given $\varepsilon>0$ we can choose $\delta>0$ so that whenever all $t_i-t_{i-1}<\delta$ we have $$\tag{1}\left|\int_a^b f(x)\,dx-\sum_{i=1}^n f(t_{i-1})(t_i-t_{i-1})\right|<\varepsilon$$ We claim that for any $\varepsilon'>\epsilon$ it also follow that for each $k$ $$\left|\int_a^{t_k}f(x)\,dx-\sum_{i=1}^k f(t_{i-1})(t_i-t_{i-1})\right|<\varepsilon'.$$ The idea is that if we had $$\tag{2}\left|\int_a^{t_k}f(x)\,dx-\sum_{i=1}^k f(t_{i-1})(t_i-t_{i-1})\right|\geq\varepsilon',$$ then by choosing some $p>n$ and new $t_{k+1}<t_{k+2}<\cdots<t_p=b$ we could make the sums on $[t_k,b]$ so close to $\int_{t_k}^b f(x)\, dx$ that inequality $(2)$ would contradict $(1)$. More precisely, choose $t_{k+1},\ldots, t_p$, still with $t_i-t_{i-1}<\delta$, so that $$\tag{3}\left|\int_{t_k}^bf(x)\,dx-\sum_{i=k+1}^p f(t_{i-1})(t_i-t_{i-1})\right|<\varepsilon'-\varepsilon>0.$$
My work:
Let $F(x)=\int_a^x f(t)dt$ on $[a,b]$, then since $F$ is continuous on $[a,b]$, it attains its minimum and maximum on some $t_k$ and $t_l$.
Now given any $\epsilon \gt 0$, there is some $\delta \gt 0$ such that for any partition with mesh less than $\delta$, we have
$|\int_a^b f(x)dx-\sum_{i=1}^n f(t_{i-1})(t_i-t_{i-1})|\lt \epsilon.$
Then by the claim after (1) in the solution, we have
$|\int_a^{t_k} f(x)dx- \sum_{i=1}^k f(t_{i-1})(t_i-t_{i-1})|\le \epsilon.$ for any $k\in \{1,\cdots, n\}$.
Hence for a given partition with mesh less than $\delta$ having the specified $t_k$ and $t_l$ as endpoints, we get
$|\phi(a)\int_a^{t_k} f(x)dx- \phi(a)\sum_{i=1}^k f(t_{i-1})(t_i-t_{i-1})|\le \phi(a)\epsilon.$
and
$|\phi(a)\int_a^{t_l} f(x)dx- \phi(a)\sum_{i=1}^l f(t_{i-1})(t_i-t_{i-1})|\le \phi(a)\epsilon.$
Clearly, $\phi(a)\int_a^{t_k} f(x)dx$ and $\phi(a)\int_a^{t_l} f(x)dx$ are the minimum and maximum of $\phi(a)\int_a^x f(t)dt$ for $x\in [a,b]$.
Now this is where my solution has hit a problem. Assume that the smallest and largest of the sums $\phi(a)\sum_{i=1}^k f(t_{i-1})(t_i-t_{i-1})$ for $k \in \{1, \dots, n\}$, are $\phi(a)\sum_{i=1}^k f(t_{i-1})(t_i-t_{i-1})$, and $\phi(a)\sum_{i=1}^l f(t_{i-1})(t_i-t_{i-1})$, respectively.
Then we have, combining the inequalities (1) and (2) in the solution and the first thing proven in problem (c),
$\phi(a)\int_a^{t_k} f(x)dx-(\phi(a)+1)\epsilon \le \phi(a)\sum_{i=1}^k f(t_{i-1})(t_i-t_{i-1})-\epsilon \le \sum_{i=1}^n f(t_{i-1})\phi(t_{i-1})(t_i-t_{i-1})-\epsilon \lt \int_a^b f(x)\phi(x)dx \lt \sum_{i=1}^n f(t_{i-1})\phi(t_{i-1})(t_i-t_{i-1})+\epsilon \le \phi(a)\sum_{i=1}^l f(t_{i-1})(t_i-t_{i-1})+\epsilon \le \phi(a)\int_a^{t_l} f(x)dx+(\phi(a)+1)\epsilon.$
Since $\epsilon$ is arbitrary, we get
$\phi(a) \int_a^{t_k} f(x)dx \le \int_a^b f(x)\phi(x)dx \le \phi(a) \int_a^{t_l} f(x)dx$, which is the desired conclusion.
However, this answer depends on the "assumption" I made in the bold sentence above. I've tried to prove this part, but have been unsuccessful. I think I followed the intentions of the written sketch in the last paragraph of the solution, but I can't get this part straight by any means. I would immensely appreciate it if anyone could show me how to solve this part, thanks for reading this long writing.

