- How did the summation expression get transformed to combination?
- From where did the constants $4$ and $3$ come from?
$$ \begin{align*} T(m^2-1) &= \sum_{r=1}^{m-1} (2r+1)r\\ &= \ \sum_{r=1}^{m-1} 4\binom{r}{2} + 3\binom{r}{1} \\ &= 4\binom{m}{3} + 3\binom{m}{2}. \end{align*} $$
This is a consequence of the fact that the binomial coefficients form a basis for the space of polynomials; see http://en.wikipedia.org/wiki/Binomial_coefficient#Binomial_coefficients_as_a_basis_for_the_space_of_polynomials .
In this case in particular, the easiest way to derive the result is likely going coefficient by coefficient. In general, ${r\choose k}$ is a polynomial of degree $k$ in $r$; since $(2r+1)r=2r^2+r$ is of degree 2, we should start with ${r\choose 2}$. A quick look at coefficients shows that ${r\choose 2}=\frac12r^2-\frac12r$, so $4{r\choose 2}=2r^2-2r$ and $(2r+1)r=4{r\choose 2}+3r$. But ${r\choose 1}$ is just $r$, so we end up with $(2r+1)r=4{r\choose 2}+3{r\choose 1}$.
The point behind making this change of basis, incidentally, is the next step in evaluating the sum: for any $k$ we have $\sum_{r=0}^{m-1}{r\choose k}={m\choose k+1}$, so once the terms of the original sum have been transformed into binomial form, we can 'collapse' the sums of binomial coefficients into a single binomial coefficient each.