A problem I saw in my textbook uses the following logic to simplify an equation.
$$\frac{m}{2}(m+1)+(m+1)\cdot\frac{2}{2}$$ $$=\frac{m+1}{2}(m+2)$$ $$=\frac{m+1}{2}[(m+1)+1]$$
The problem that I'm having is that I do not understand how the first line simplifies to the second line. Whenever I attempt to simplify the problem I am left with $$\frac{m(m+1)}{2}+m+1$$ which is pretty much the same as if the 2/2 was never included in the problem. Any insight on how this works would be greatly appreciated.