DT Ramp Signal Summation Notation Help?
When you substituted m = n-k, that also swaps the limits.

Because when \$k=\infty\$ (the old upper limit), \$n-k=-\infty\$. Since that is lower than any other index in the summation, it becomes the new lower limit.

Edit

I think the problem you were given is itself a bit wrongheaded since you can just pull out the first term of the first summation and get

$$\begin{align}
   \sum_{m=0}^n (n-m) - \sum_{m=1}^n(n-m) 
   &amp;= (n-0) + \sum_{\color{red}{m=1}}^n (n-m) - \sum_{m=1}^n(n-m)\\
   &amp;= n
\end{align}$$

No mucking about with delta functions is needed to get the desired result.