We have,
(x+y+z+1xy+1yz+1zx)2
Total number of terms
= 2+6−1C6−1= 7C5=21
Similarly for
(x+y+z+1x+1y+1z)2
The total number of terms =21
Now, for first expansion, we get
1x=y×1xy or z×1zx1y=x×1xy or z×1zy1z=x×1xz or y×1zy
So, the number of distinct terms m=21−3=18
And, for the second expansion, we get
1=x×1x or y×1y or z×1z
So, the number of distinct terms n=21−2=19
Hence, m+n=18+19=37