This is a Binomial Distribution. Assuming teams A and B have equal ability, and that A is equally likely to win at home as away, the probability that A wins any particular game is 1/2.
Also, you did not say how many playoffs games there were. Did team win 3 out of 3 playoff games? That is what I am assuming in this answer.
So p = 1/2, 1-p = 1/2
In general P(r successes out of n trials) = nCr pr (1-p)n-r
P(A wins 5 out of 7 home games) = 7C5 (1/2)5 (1/2)2 = 7C5 (1/2)7
P(A wins 2 out of 7 away games) = 7C2 (1/2)2 (1/2)5 = 7C2 (1/2)7
P(A wins 3 out of 3 playoff games) = 3C3 (1/2)3 = (1/2)3
Total Probability = 7C5 (1/2)7 * 7C2 (1/2)7 * (1/2)3 ≈ .0034