Here is the original problem:
Let $f:[0,1]\to \mathbb{R}$ be a positive continuous function. Show that for every positive integer $n$ there is a unique $a_n\in (0,1]$ with $$ \int _0^{a_n} f(x)\,dx = \frac{1}{n} \int _0^1 f(x)\,dx. $$ Further, compute $\lim_{n\to\infty} n a_n.$
My work:
Let $F(x) = \int _0^x f(t)\,dt.$ We have $F(0)=0$ and by the FTC $F$ is continuously differentiable, and strictly increasing since $f$ is positive. Note also that $F(1) = \int _0^1 f(x)\,dx = M<\infty.$ Since $F$ is differentiable (hence continuous), by the Intermediate Value Theorem there is some point $a_2\in (0,1)$ such that $F(a_2) = M/2;$ further, since $F$ is increasing, $a_2$ is unique. The generalization to $a_n$ is immediate.
Since $F$ is strictly increasing and differentiable, it has a well-defined inverse on $[0,1].$ Then the limit is $$ \lim_{n\to \infty} n a_n = \lim _{n\to \infty} n\cdot F^{-1}\left(\frac{M}{n}\right) $$Make the substitution $u=M/n$: $$ = M\lim _{u\to0^+} \frac{F^{-1}(u)}{u}. $$Since $F(0)=0,$ $F^{-1}(0)=0$ and since $F$ is differentiable, we may use L'Hopital's Rule: $$ = M\lim_{u\to 0^+} \frac{d}{du}{F^{-1}(u)} = \lim _{u\to 0^+} \frac{M}{F'(F^{-1}(u))}= \frac{M}{f(F(0))}=\frac{1}{f(0)}\int_0^1 f(x)\,dx. $$
The problem provided the following hint:
First show the existence of $\{a_n\}.$ Then show that $a_n\to 0 $ and $\int _0^{a_n} f(x)\,dx=a_n f(\xi_n)$ for some $0<\xi_n<a_n.$
I think the idea is to use the hint and the First MVT for Integrals to show that $\lim_{n\to\infty}na_n =\frac{1}{f(0)}\int_0^1 f(x)\,dx$ but I'd be curious to see how and if there are other methods of proof as well.
For the first part, you don't need MVT. The IVT already suffices: let $I=\int_0^1f(x)dx$ and $g(a)=\int_0^af(x)dx$. Since $f$ is positive and continuous, $g$ is strictly increasing and continuous. Also, $g(0)=0<\frac1nI\le g(1)$. Therefore, by IVT, there exists some $a_n\in[0,1]$ such that $g(a_n)=\frac1nI$. The value of $a_n$ cannot be zero because $g(0)<I$. It is also unique because $g$ is strictly increasing.
For the second part, as Daniel Fischer commented, the hint was likely intended to mean that $na_n=\frac{1}{\xi_n}\int_0^1f(x)dx$.
Alternatively, note that $(a_n)$ is a decreasing sequence that is bounded below. Therefore it converges and $g\left(\lim_{n\to\infty}a_n\right)=\lim_{n\to\infty}g(a_n)=\lim_{n\to\infty}\frac1nI=0$. Since $g>0$ on $(0,1]$, $\lim_{n\to\infty}a_n$ must be zero. Therefore, by the first FTC, \begin{aligned} I=\lim_{n\to\infty}I &=\lim_{n\to\infty}na_n\frac{g(a_n)}{a_n}\\ &=\lim_{n\to\infty}na_n\cdot\lim_{n\to\infty}\frac{g(a_n)-g(0)}{a_n-0}\\ &=\lim_{n\to\infty}na_n\cdot\lim_{a\to0}\frac{g(a)-g(0)}{a-0}\\ &=\lim_{n\to\infty}na_ng'(0)\\ &=\lim_{n\to\infty}na_nf(0) \end{aligned} and hence $\lim_{n\to\infty}na_n=\frac{1}{f(0)}I$.