All the terms in the expansion (1+x3)40 is in the form x3r and in the x(1+x3)40 is of the form x3p+1
So 3r=50 or 3p+1=50 Where we do not get integer values of r,p so the coefficient of x50 is 0