Given coefficient of x in expansion of (1+x)p(1−x)q is −3
⇒C0qC1p−C0pC1q=−3
⇒p−q=−3⋯(1)
Now coefficients of x2 in expansion of (1+x)p(1−x)q
−C1qPC1+C0qC2P+C0PC2q=−5
⇒−pq+2p(p−1)+2q(q−1)=−5⋯(2)
Solving (1) and (2)
p=8,q=11
Coefficient of x3 in expansion of (1+x)p(1−x)q will be,
−C3q+C3p+Cp1qC2−Cp2qC1
=−C311+C38+C18C211−C28C111
=23