I'm trying to teach myself induction, I get the idea behind it but theres always some weird jump in algebra at some point that throws me in the examples.

I'm following the example here

The bit that throws me is how they got from:

$\displaystyle = (n+1)^2 + \frac{1}{6}n(n+1)(2n+1) $

To:

$\displaystyle = \frac{1}{6}(n+1)[6(n+1) + n(2n+1)] $

Doesn't make sense to me how they got rid of the + and the power of 2.

Thanks.