Imagine that A and B each toss $4$ times. There is a certain probability $p$ that A is ahead, and by symmetry the same probability $p$ that B is ahead. If A is already ahead, she will win, whatever her $5$th toss. If B is already ahead, she will win. And if they are tied, there is probability $1/2$ that A will get a head on her $5$th toss and win. Thus by symmetry the probability that A wins is $1/2$.
Or else we can compute. The probability they are tied after $4$ is $1-2p$. Thus the probability that A wins is
$$p+\frac{1}{2}(1-2p)=\frac{1}{2}.$$
Remark: The same argument applies if B has $n$ coins and A has $n+1$.
I ask you for additional explanation. Meanwhile I'll post here another approach.
Denote by $\tau_i^5$ the random variable that counts the time required to get five heads starting from $i$ heads, ok?
What we want is exactly $E[\tau_0^5]$, right?
Now, you can evaluate $E[\tau_0^5]$ conditioning at the first step.
$$
E[\tau_0^5] = \frac{E[\tau_0^5]}{2} + \frac{E[\tau_1^5]}{2} +1
$$
Explaining the equation above. With probability $1/2$ you have a tail, so the time you will take to get five heads is the same, because you have any heads. On the other hand, with the same probability you get a head, and now, the number of flips needed to get 5 heads is $E[\tau_1^5]$, because now you that you have one head. The +1 it is because you have to count the first step.
Repeating the argument above you get
$$
E[\tau_1^5] = \frac{E[\tau_0^5]}{2} + \frac{E[\tau_2^5]}{2} +1
$$
Proceeding this way, and remembering $E[\tau_5^5]=0$, you get
$$
E[\tau_0^5] = 62
$$
This may seems more complicated at the first sight, but the idea of "to conditionate at what happens at the first time (or movement)" solve a big variety of problems.
Best Answer
Your question is related to the binomial distribution.
You do $n = 10$ trials. The probability of one successful trial is $p = \frac{1}{2}$. You want $k = 3$ successes and $n - k = 7$ failures. The probability is:
$$ \binom{n}{k} p^k (1-p)^{n-k} = \binom{10}{3} \cdot \left(\dfrac{1}{2}\right)^{3} \cdot \left(\dfrac{1}{2}\right)^{7} = \dfrac{15}{128} $$
One way to understand this formula: You want $k$ successes (probability: $p^k$) and $n-k$ failures (probability: $(1-p)^{n-k}$). The successes can occur anywhere in the trials, and there are $\binom{n}{k}$ to arrange $k$ successes in $n$ trials.