Answer:
4pq(p³+q³)
Step-by-step explanation:
Exactly 5 game would be when 4 wins and 1 loss of a particular person
loss has to be one of the first 4 games
A wins: qp⁴ + pqp³ + p²qp² + p³qp
= qp⁴ + qp⁴ + qp⁴ + qp⁴ = 4qp⁴
B wins: pq⁴ + qpq³ + q²pq² + q³pq
= pq⁴ + pq⁴ + pq⁴ + pq⁴ = 4pq⁴
A wins or B wins:
4pq⁴ + 4qp⁴ = 4pq(q³+p³)