# the moment generating function of the negative binomial distribution

According to the textbook I use, it states that:

$$X$$~$$Neg.bin(x;k,\theta) = {n-1 \choose k-1}\theta^k(1-\theta)^{n-k}$$

Which I have no problem. The problem arises when I try to find the moment generating function. I know the procedure, I just can't compute it. I've seen many other solutions - I could follow them, but my equation is too 'different' from them and their solutions won't easily work in this case.

Can you help me with the computation? also, if possible, can you show me how to derive the mean and variance from the resulting MGF? Thank you in advance