What is the probability f(p) of A winning the match? 
Here's my approach:
Let A denote the event "A wins the game" and B denote the event "B wins the game"
I am supposed to calculate the probability f(p)
There are two possible cases:-
i) A wins within 4 games
Possible cases: AAA,ABAA,BAAA,AABA
ii) A doesn't win within 4 games
Possible cases: AABB(A and B occur 2 times each) ABABABAB...(A and B occur k times each) AA
AABB can be arranged in 6 ways
ABABAB.... can be arranged in $(2!)^k$ ways (A and B are adjacent to one another)
Now :
f(p) = P(case i) + P(case ii)
P(case ii) = $(6 (p^2) (1-p)^2 ) \sum_{k=1}^∞  2^k . p^k . (1-p)^k. p^2  $=$(6 (p^4) (1-p)^2 ) \sum_{k=1}^∞  2^k . p^k . (1-p)^k$
= $(6. 2 . p^5 . (1-p)^3)/(1-2p+2p^2)$ (The denominator seems correct)
P(case i ) = $p^3 +3p^3(1-p)$
f(p) = $p^3 +3p^3(1-p) + \frac{(6. 2 . p^5 . (1-p)^3)}{(1-2p+2p^2)}$
The expected answer is not produced by solving the above equation.Where did I go wrong?
Edit:-
I finally figured out the mistake that I made in the above solution.
In P(case ii) = $(6 (p^4) (1-p)^2 ) \sum_{k=1}^∞  2^k . p^k . (1-p)^k $, I replaced $\sum_{k=1}^∞$ with $\sum_{k=0}^∞$ . There has to be one case when B does not occur after the tie, i.e. A occurs only two times.
P(case ii) =  $(6 (p^4) (1-p)^2 ) \sum_{k=0}^∞  2^k . p^k . (1-p)^k $
=  $(6 (p^4) (1-p)^2 ) .[1+2p(1-p)^1+2^2.p^2.(1-p)^2+...]$
=$(6 (p^4) (1-p)^2 ) .\frac{1}{1-2p(1-p)}$
f(p) = P(case i) + P(case ii)
=$p^3 +3p^3(1-p)+(6 (p^4) (1-p)^2 ) .\frac{1}{1-2p(1-p)}$
=$p^3[1+3(1-p)+\frac{6p(1-p)^2}{1-2p(1-p)}]$
=$p^3[1+(3-3p)+\frac{6p-12p^2+6p^3}{1-2p+2p^2)}]$
=$p^3[\frac{(1-2p+2p^2)+(3-6p+6p^2-3p+6p^2-6p^3)+(6p-12p^2+6p^3)}{1-2p+2p^2)}]$
=$p^3\frac{(4-5p+2p^2)}{1-2p+2p^2}$
 A: $A$ can win in three games with $3-0$ or $3-1$, else they must reach $2-2$ and then has to win by a difference of $2$

*

*To win directly, $A$ wins with $p^3 + \binom31 p^3(1-p) = 4p^3 -3p^4$


*To reach $2-2, Pr = \binom42p^2(1-p)^2$


*Let $P(A$ ultimately wins from $2-2$) be $d$
Then either A wins in straight two points or is back to equal scores, thus eqivalent to $2-2$, so $d = p^2 + 2p(1-p)d$ which gives $d = \frac{p^2}{2p^2-2p+1}$


*Putting the pieces together, $$P(A\; wins) = p^3+3p^3(1-p) + [6p^2(1-p)^2] \times \frac{p^2}{2p^2-2p+1}$$
Added
On giving it to Wolfram the answer I get is
$$P(A\; wins) = \frac{p^3(2p^2-5p+4)}{2p^2-2p+1}$$
which tallies with the book answer
A: Let $q = 1 - p.$

Suppose that the match is tied 2-2 after 4 games.
Let $R$ denote the probability of A's winning the match, in that event.
Then
$$R = p^2 + 2pqR \implies R(1 - 2pq) = p^2 \implies R = \frac{p^2}{1 - 2pq}.$$
After $4$ games either A has won all $4$, A has won $3$ out of $4$ (where it is harmless to play the 4th game if A won the first three games), the match is split 2-2, or A has lost.
Therefore, A's probability of winning is
$$p^4 + 4p^3q + 6p^2q^2R = p^4 + 4p^3q + \left[6p^2q^2 \times \frac{p^2}{1 - 2pq}\right]$$
$$= p^3 \times \left\{ ~  p + 4q + \frac{6pq^2}{1 - 2pq}
~\right\}$$
$$= 
p^3 \times \left\{ ~\frac{[ ~(1 - 2pq)(p+4q) ~] + 6pq^2}{1 - 2pq}
 ~\right\}. \tag1 $$
Then:

*

*$1 - 2pq = 1 - 2p(1 - p) = 1 - 2p + 2p^2.$

*$p + 4q = p + 4(1 - p) = 4 - 3p.$

*$6pq^2 = 6p(1 - 2p + p^2) = 6p - 12p^2 + 6p^3.$
The given answer is
$$\frac{p^3(4 - 5p + 2p^2)}{1 - 2p + 2p^2}. \tag2 $$
Comparing (1) and (2), the problem reduces to showing that
$$[(1 - 2pq)(p + 4q)] + (6p - 12p^2 + 6p^3) = (4 - 5p + 2p^2). \tag3 $$

$$(1 - 2p + 2p^2)(4 - 3p) = 4 - 11p + 14p^2 - 6p^3.$$
Therefore, the equality in (3) above is established.
A: I would treat the $2$-$2$ case separately.  Calculate the probability that $B$ has won by the end of Game $4$.  Then you know the probability of arriving at a $2$-$2$ tie.
$A$ wins within $4$ games with probability $p^3+3p^3(1-p)=4p^3-3p^4=p^3(4-3p)$.
$B$ wins within $4$ games with probability $(1-p)^3+3p(1-p)^3=(1-p)^3(1+3p).$
A $2$-$2$ tie occurs with probability $y=1-[p^3(4-3p)+(1-p)^3(1+3p)]$.
In a $2$-$2$ tie, the probability that $A$ wins immediately is $p^2$, the probability that $B$ wins immediately is $(1-p)^2$, and the probability that we reach another tie is $2p-2p^2$.  This, if you reach the tied state, the probability $x$ that $A$ eventually wins the game satisfies $x=p^2+(2p-2p^2)x$, so $x=\dfrac{p^2}{2p^2-2p+1}$.
Thus, the probability that $A$ wins is $p^3(4-3p)+xy$.
I haven't worked through the algebra to confirm this results in the expected answer, nor have I worked through your algebra to see whether the mistake is there or in the way you've set up the problem.
A tweak to this approach is to observe that if the match is tied $1$-$1$, the probability of an $A$ win is $x$, calculated above, because we're already in the position where the first player to lead by $2$ wins.
$A$ will lead $2$-$0$ with probability $p^2$ and once there, will win without going to "overtime" with probability $p(2-p)$.
$B$ will lead $2$-$0$ with probability $(1-p)^2$ and once there will win without going to "overtime" with probability $1-p^2$.
