https://gateoverflow.in/65803/find-number-integral-solutions-using-generating-function
This post and material in its links are enough.
@bhuv very good analysis. But small correction is required in your explanation (check for typo)
Gatecse