I am reading An Introduction to Inequalities by Beckenbach and Bellman and on chapter 4.3 there is this exercise. It's regarding AM-GM inequality.
How can I prove it? I can't figure it out.
$$ {m_1y_1+m_2y_2+\cdots+m_ky_k \over m_1+m_2+\cdots+m_k} \ge \sqrt[\large m_1+m_2+\cdots+m_k]{y_1^{m_1}\cdot y_2^{m_2}\cdots y_k^{m_k}} $$
The authors has this hint (consider AM-GM written using $a_1, a_2,\dots$):
In the arithmetic-mean-geometric-mean inequality (4. 19) set the first $m_1$ of the numbers $a_i$ equal to the same value $y_1$, set the next $m_2$ of the numbers $a_i$ equal to the same number $y_2$, and set the last $m_k$ of the numbers $a_i$ equal to the same value $y_k$, and observe that $m_1+m_2+\dots+m_k=n$.
But I just don't understand what he means by this. Substitute what with what ?