Question: [I have a doubt in proving an inequality, I have underlined the step which confuses me. I would like to know from where did that expression come?][1]

[]: <https://i.stack.imgur.com/tjcA3.jpg>

Answer: 
Since both $a$ and $b$ are positive and

$$a \lt b \tag{1}\label{eq1A}$$

you have for all $0 \le i \le n$ by taking both sides of \eqref{eq1A} to the power of $n-i$ and then multiplying both sides by $a^{i}$ that

$$\begin{equation}\begin{aligned}
a^{n-i} \le b^{n-i} \\
a^{n} \le a^{i}b^{n-i}
\end{aligned}\end{equation}\tag{2}\label{eq2A}$$

and by taking sides of \eqref{eq1A} to the power of $i$ and then multiplying both sides by $b^{n-i}$ that

$$\begin{equation}\begin{aligned}
a^{i} \le b^{i} \\
a^{i}b^{n-i} \le b^{n}
\end{aligned}\end{equation}\tag{3}\label{eq3A}$$

Putting \eqref{eq2A} and \eqref{eq3A} together gives

$$a^{n} \le a^{i}b^{n-i} \le b^{n} \tag{4}\label{eq4A}$$

For $1 \le i \le n - 1$, the inequalities above are actually strictly less thans, i.e., $a^{n} \lt a^{i}b^{n-i} \lt b^{n}$. The underlined line came from the expression in the brackets in the line above on the right, with the parts on the left & right coming from using \eqref{eq4A} and summing it for all of the $n + 1$ terms in the middle.
Since $b>a$, then $a^{n-1}.b>a^{n-1}.a=a^{n}$. Similarly
 $$a^{n-2}.b^{2}>a^{n-2}.a^{2}=a^{n},\quad \cdots, \quad b^{n-1}.a>a^{n-1}.a>a^{n}, \quad b^{n}>a^{n}$$
Then
$$b^{n}+b^{n-1}.a+\cdots +a^{n}>a^{n}+a^{n}+ \cdots +a^{n}=(n+1).a^{n}$$
The other inequality is similar.