I want to evaluate the following sum
$$ \sum_{n=r}^{\infty} n^2 \binom{n-1}{r-1} p^r (1-p)^{n-r} $$
where $r \in \mathbb{N}$ and $0<p<1$.
Using WA I know that the sum evaluates to $\frac{r(r-p+1)}{p^2}$ but I don't know how to show this. I tried simplifying the sum a bit using that $$ n \binom{n-1}{r-1} = r \binom{n}{r} $$ Which gives me the new equivalent sum $$ \sum_{n=r}^{\infty} n^2 \binom{n-1}{r-1} p^r (1-p)^{n-r} = r\sum_{n=r}^{\infty} n \binom{n}{r} p^r (1-p)^{n-r} $$ but I didn't know how to continue. I have also previously shown that $$ \sum_{k=s}^{\infty} \binom{k-1}{s-1} (1-t)^{k-s} t^{s} = 1 $$ for $\lvert 1 - t \rvert <1$. I tried to apply this but I couldn't find a way to get rid of the factor of $n$ multiplying the binomial coefficients. Can anyone give me any hints as to how I can show this?
Using an extension of the method described in this answer, it is straightforward to show that
$$n(n+1) \binom{n-1}{r-1} = \frac{(n+1)!}{(r-1)!(n-r)!} = r(r+1) \frac{(n+1)!}{(r+1)!(n-r)!} = r(r+1) \binom{n+1}{r+1},$$ consequently
$$\begin{align} \sum_{n=r}^\infty n(n+1) \binom{n-1}{r-1} p^r (1-p)^{n-r} &= r(r+1) \sum_{n=r}^\infty \binom{n+1}{r+1} p^r (1-p)^{n-r} = r(r+1) \\ &= r(r+1) p^{-2} \sum_{n=r+2}^\infty \binom{n-1}{(r+2)-1} p^{r+2} (1-p)^{n-(r+2)} \\ &= \frac{r(r+1)}{p^2}. \end{align}$$
And since the linked answer also provided $$\sum_{n=r}^\infty n \binom{n-1}{r-1} p^r(1-p)^{n-r} = \frac{r}{p},$$ we combine these results to obtain $$\sum_{n=r}^\infty n^2 \binom{n-1}{r-1} p^r(1-p)^{n-r} = \frac{r(r+1)}{p^2} - \frac{r}{p} = \frac{r(r+1-p)}{p^2}.$$