This is from a solution to a problem (3b here). I can't understand why the highlighted parts are equal. I've figured out that $\sum_{i=a}^b i$ is the same as $\sum_{i=1}^{b-a+1} (i+b-a)$. The bounds on the second sum agree with that.
$b$ and $1$ (in the numerator) are constants and may be pulled out of the sum (like $\frac1{b-a+1}$ was), but why have they disappeared altogether? And why has $k$ changed sign?
I think the highlighted part should become $\sum_{ k= 1}^{b-a} (b-k+1+a)$.
What am I missing here?
Thank you in advance.
