a: \(k\left(k+1\right)\left(k+2\right)-k\left(k-1\right)\left(k+1\right)\)
\(=k\left(k+1\right)\left(k+2-k+1\right)\)
=3k(k+1)
b: \(S=1\cdot2+2\cdot3+...+n\left(n+1\right)\)
\(=1\left(1+1\right)+2\left(1+2\right)+...+n\left(n+1\right)\)
\(=\left(1+2+...+n\right)+\left(1^2+2^2+...+n^2\right)\)
\(=\dfrac{n\left(n+1\right)}{2}+\dfrac{n\left(n+1\right)\left(2n+1\right)}{6}\)
\(=\dfrac{3n\left(n+1\right)+n\left(n+1\right)\left(2n+1\right)}{6}=\dfrac{n\left(n+1\right)\left(2n+4\right)}{6}=\dfrac{n\left(n+1\right)\left(n+2\right)}{3}\)