Suppose we state with the expression
\[(1+x)^n\]
.\[(1+x)^n=(1+x)^2(1+x)^{n-2} =(1+2x+x^2)(1+x)^{n-2}\]
\[\sum_{r=0}^n n \begin{pmatrix}n\\r\end{pmatrix}x^r=(1+2x+x^2) \sum_{r=0}^{n-2} \begin{pmatrix}n-2\\r\end{pmatrix} x^r\]
\[\sum_{r=0}^n \begin{pmatrix}n\\r\end{pmatrix}x^r= \sum_{r=0}^{n-2} \begin{pmatrix}n-2\\r\end{pmatrix}x^r + 2 \sum_{r=0}^{n-2} \begin{pmatrix}n-2\\r\end{pmatrix}x^{r+1} + \sum_{r=0}^{n-2} \begin{pmatrix}n-2\\r\end{pmatrix}x^{r+2} \]
\[\sum_{r=0}^n \begin{pmatrix}n\\r\end{pmatrix}x^r= \sum_{r=0}^{n-2} \begin{pmatrix}n-2\\r\end{pmatrix}x^r + 2 \sum_{r=1}^{n-1} \begin{pmatrix}n-2\\r-1\end{pmatrix}x^r + \sum_{r=2}^n \begin{pmatrix}n-2\\r-2\end{pmatrix}x^r \]
Now equating coefficients.
\[r=0\]
: Both sides equal 1 (last two terms are zero).\[r=1\]
: \[n=(n-2)+2(1)\]
(last term is zero).\[r \ge 2\]
: \[\begin{pmatrix}n\\r\end{pmatrix}= \begin{pmatrix}n-2\\r\end{pmatrix}+ 2 \begin{pmatrix}n-2\\r-1\end{pmatrix} + \begin{pmatrix}n-2\\r-2\end{pmatrix} \]