Since we assume the outcome of the games are independent and the probability that A wins any one game is p. We will have that:
The probability that:
Team A wins in 5 games =
Team B wins in 5 games =
Since there are 4 ways each team can win in 5 games, the probability that the series last 5 games is:
Thus, the answer is: