Could you explain me the change in the limits of this double sum?

$\displaystyle \sum_{a=0}^n\binom{n}{a}(1+x(1-y))^{n+a}x^a(y+x(1-y))^a\sum_{b=0}^{n+a}\binom{n+a}{b}k^b=$

$\displaystyle =\sum_{b=0}^{2n}\sum_{a=max(0,b-n)}^n\binom{n}{a}\binom{n+a}{b}(1+x(1-y))^{n+a}x^a(y+x(1-y))^ak^b$

Is there any property about this change and how can I understand the correct change in a similar case?