a)
xi can take value from 0 to 17
so required slution is ---
coeff of x17 in the given expression
(x0+x1+x2+..... +x15+x16+x17)(x0+x1+x2+..... +x15+x16+x17)(x0+x1+x2+..... +x15+x16+x17)(x0+x1+x2+..... +x15+x16+x17)
which is $\binom{17+4-1}{17}$
b) here xi can take value from 0 to 5
so required slution is ---
coeff of x29 in the given expression
(x0+x1+x2+x3+x4+x5)(x0+x1+x2+x3+x4+x5)(x0+x1+x2+x3+x4+x5)(x0+x1+x2+x3+x4+x5)(x0+x1+x2+x3+x4+x5)(x0+x1+x2+x3+x4+x5) [6 times because variable is 6(x1 to x6)]
= coeff of x29 in expression $\frac{ (x6 -1)^{6}}{x-1}$
= $\binom{6}{4}*1 + \binom{6}{3}*1 + \binom{6}{2}*1 + \binom{6}{1}*1 + \binom{6}{0}*1$ [$\binom{6}{6} + \binom{6}{5}$ is not in ans because x6*6 and x6*5 is greater than x29 and all power of x in (x-1)-1 is 1