Let's simplify the expression $ (1 - x^{n+1})^m $ using some familiar techniques. When the power is a positive integer, we can leverage the standard binomial theorem:
$$ (1 - x^{n+1})^m = \sum_{i=0}^m (-1)^i \binom{m}{i} x^{(n+1)i} $$
On the other hand, for $ (1 - x)^{-m} $, where the power is a negative integer, we turn to the negative binomial theorem:
$$ (1 - x)^{-m} = \sum_{j=0}^\infty \binom{m+j-1}{j} x^j $$
Now, let's combine these results by multiplying the two sums:
$$ \left( \frac{1 - x^{n+1}}{1 - x} \right)^m = \sum_{i=0}^m \sum_{j=0}^\infty (-1)^i \binom{m}{i} \binom{m+j-1}{j} x^{(n+1)i+j} $$
This expression reveals the coefficient for $x^k$, which is given by:
$$ \sum_{\substack{0 \leq i \leq m, \\ j \geq 0 \\ (n+1)i+j=k}} (-1)^i \binom{m}{i} \binom{m+j-1}{j} $$
now you can use this result directly to your problem
any combinotorics books will must have this kind of problems