Step 1: Expand each factor by the binomial theorem.
(1+2x)6=6C0+6C1(2x)+6C2(2x)2+6C3(2x)3+6C4(2x)4+6C5(2x)5+6C6(2x)6
=1+12x+60x2+160x3+240x4+192x5+64x6
(1−x)7=7C0−7C1x+7C2x2−7C3x3+7C4x4−7C5x5+7C6x6−7C7x7
=1−7x+21x2−35x3+35x4−21x5+7x6−x7
Step 2: An x5 term comes from a term xp of the first factor times a term xq of the second with p+q=5. The six pairs are:
- 1×(−21x5) gives −21
- 12x×35x4 gives 420
- 60x2×(−35x3) gives −2100
- 160x3×21x2 gives 3360
- 240x4×(−7x) gives −1680
- 192x5×1 gives 192
Step 3: Add the contributions:
−21+420−2100+3360−1680+192=171
Hence the coefficient of x5 is 171.