\begin{align} \sum^n_{k=1}f(k)\sum^k_{i=1}g(i) &=\sum^n_{k=1}g(k)\sum^n_{i=k}f(i) \end{align}
(横に長いため小さめにしています)
\begin{align}
\textstyle{\sum\limits^n_{k=1}
\!{\small f(k)}\!\sum\limits^k_{i=1}\!{\small g(i)}}
&=\underset{}{\small f(1)g(1)\,+\,f(2)\big(g(1)+g(2)\big)\,+\,f(3)\big(g(1)+g(2)+g(3)\big)\,+\cdots+\,f(n)\big(g(1)+g(2)+\cdots+g(n)\big)}\\
&=\underset{}{\small\big(f(1)+f(2)+\cdots+f(n)\big)g(1)+\big(f(2)+f(3)+\cdots+f(n)\big)g(2)+\big(f(3)+f(4)+\cdots+f(n)\big)g(3)+\cdots+f(n)g(n)}\\
&=\underset{}{\textstyle\sum\limits^n_{k=1}\hspace{-1.2mm}\raise{-0.4mm}{\biggl(}\hspace{-1mm}\sum\limits^n_{i=k}{\small f(i)}\hspace{-1.5mm}\raise{-0.4mm}{\biggl)}\hspace{-0.2mm}{\small g(k)}}\\
&={\textstyle\sum\limits^n_{k=1}\!{\small g(k)}\!\sum\limits^n_{i=k}\!{\small f(i)}}
\end{align}