The listed p.g.f for negative binomial is wrong. There should be no z {\displaystyle z} on the numerator, i.e.
( p 1 − q z ) r {\displaystyle \left({\frac {p}{1-qz}}\right)^{r}}