In a section on inductive proofs in the book Modelling Computing Systems: Mathematics for Computer Science (Muller, Struth) there is a simplification that is assumed to be trivial, but that I can't figure out.
It occurs in this step:
$$ \frac{k(k+1)(k+2)}{3} + (k+1)(k+2) \stackrel{?}= \frac{(k+1)(k+2)(k+3)}{3} $$
How does one get from the first expression to the second?
$$ \begin{align} \frac{k(k+1)(k+2)}{3} + (k+1) (k+2) &= \frac{\color{red}{k}(k+1)(k+2) + \color{red}{3}(k+1)(k+2)}{3}\\ &= \frac{(k+1)(k+2)(\color{red}{k}+\color{red}{3})}{3} \end{align} $$