Hint: Start with $$f(t)=\sum_{k=0}^n t^k.$$You can give a closed-form expression for $f$ since it's just a geometric series.
So differentiating gives a closed form for $$f'(t)=\sum_{k=0}^n kt^{k-1}.$$Multiply both sides of that by $t$ and you have $\sum_{k=0}^n kt^k$. Now you're exactly halfway there.
Key word: "generating function".
Hint: Start with $$f(t)=\sum_{k=0}^n t^k.$$You can give a closed-form expression for $f$ since it's just a geometric series.
So differentiating gives a closed form for $$f'(t)=\sum_{k=0}^n kt^{k-1}.$$Multiply both sides of that by $t$ and you have $\sum_{k=0}^n kt^k$. Now you're exactly halfway there.