A team plays 10 matches with probability of winning each match p=31 and losing q=32. Let x denote the number of wins and y the number of losses. Since x+y=10, it follows that y=10−x.
Substituting into the condition ∣x−y∣≤2 gives ∣x−(10−x)∣≤2⟹∣2x−10∣≤2⟹−2≤2x−10≤2⟹4≤x≤6, so the possible values of x are 4,5,6.
Since X∼Binomial(10,1/3), the probability mass function is P(X=r)=(r10)(31)r(32)10−r=310(r10)⋅210−r.
For r=4 this yields P(X=4)=310(410)⋅26=310210×64=31013440.
For r=5 one finds P(X=5)=310(510)⋅25=310252×32=3108064.
For r=6 we have P(X=6)=310(610)⋅24=310210×16=3103360.
Adding these probabilities gives p=P(∣x−y∣≤2)=31013440+8064+3360=31024864.
Multiplying by 39 yields 39p=39⋅31024864=324864=8288.
Therefore, the final answer is 8288.