Let $e$ be the expected number of tosses. It is clear that $e$ is finite.
Start tossing. If we get a tail immediately (probability $\frac{1}{2}$) then the expected number is $e+1$. If we get a head then a tail (probability $\frac{1}{4}$), then the expected number is $e+2$. Continue $\dots$. If we get $4$ heads then a tail, the expected number is $e+5$. Finally, if our first $5$ tosses are heads, then the expected number is $5$. Thus
$$e=\frac{1}{2}(e+1)+\frac{1}{4}(e+2)+\frac{1}{8}(e+3)+\frac{1}{16}(e+4)+\frac{1}{32}(e+5)+\frac{1}{32}(5).$$
Solve this linear equation for $e$. We get $e=62$.
Let $A_{m,n}$ be the probability that player $A$ flips two consecutive heads before player $B$ flips three consecutive heads, given that $A$'s (resp. $B$'s) current run of heads has length $m$ (resp. $n$). Then
$$
A_{m,n}=\frac{1}{4}\left(A_{m+1,n+1} + A_{m+1,0} + A_{0,n+1}+A_{0,0}\right);
$$
the boundary conditions are that $A_{m,n}=1$ for $m\ge 2$ and $n < 3$, and $A_{m,n}=0$ for $m \le 2$ and $n\ge 3$. You want to find $A_{0,0}$. The relevant six equations are:
$$
\begin{eqnarray}
A_{0,0} &=& \frac{1}{4}A_{1,1} + \frac{1}{4}A_{1,0} + \frac{1}{4}A_{0,1} + \frac{1}{4}A_{0,0}\\
A_{0,1} &=& \frac{1}{4}A_{1,2} + \frac{1}{4}A_{1,0} + \frac{1}{4}A_{0,2} + \frac{1}{4}A_{0,0} \\
A_{1,0} &=& \frac{1}{2} + \frac{1}{4}A_{0,1} + \frac{1}{4}A_{0,0} \\
A_{1,1} &=& \frac{1}{2} + \frac{1}{4}A_{0,2} + \frac{1}{4}A_{0,0} \\
A_{0,2} &=& \frac{1}{4}A_{1,0} + \frac{1}{4}A_{0,0} \\
A_{1,2} &=& \frac{1}{4} + \frac{1}{4}A_{0,0},
\end{eqnarray}
$$
or
$$
\left(\begin{matrix}3/4 & -1/4 & -1/4 & -1/4 & 0 & 0 \\
-1/4 & 1 & -1/4 & 0 & -1/4 & -1/4 \\
-1/4 & -1/4 & 1 & 0 & 0 & 0 \\
-1/4 & 0 & 0 & 1 & -1/4 & 0 \\
-1/4 & 0 & -1/4 & 0 & 1 & 0 \\
-1/4 & 0 & 0 & 0 & 0 & 1
\end{matrix}\right)\times\left(\begin{matrix} A_{0,0} \\ A_{0,1} \\ A_{1,0} \\ A_{1,1} \\ A_{0,2} \\ A_{1,2}
\end{matrix}\right)
= \left(\begin{matrix}
0 \\
0 \\
1/2 \\
1/2 \\
0 \\
1/4
\end{matrix}\right),
$$
assuming no typos. Further assuming no typos entering this into WolframAlpha, the result is
$$
A_{0,0} = \frac{1257}{1699} \approx 0.7398,
$$
which at least looks reasonable.
Update: As pointed out in a comment, the above calculation finds the probability that $A$ gets two consecutive heads sooner than $B$ gets three consecutive heads; the original problem asks for the opposite. The correct boundary conditions for the original problem are that $A_{m,n}=1$ for $m<2$ and $n\ge 3$ and $A_{m,n}=0$ for $m\ge 2$ and $n\le 3$. The matrix equation becomes
$$
\left(\begin{matrix}3/4 & -1/4 & -1/4 & -1/4 & 0 & 0 \\
-1/4 & 1 & -1/4 & 0 & -1/4 & -1/4 \\
-1/4 & -1/4 & 1 & 0 & 0 & 0 \\
-1/4 & 0 & 0 & 1 & -1/4 & 0 \\
-1/4 & 0 & -1/4 & 0 & 1 & 0 \\
-1/4 & 0 & 0 & 0 & 0 & 1
\end{matrix}\right)\times\left(\begin{matrix} A_{0,0} \\ A_{0,1} \\ A_{1,0} \\ A_{1,1} \\ A_{0,2} \\ A_{1,2}
\end{matrix}\right)
= \left(\begin{matrix}
0 \\
0 \\
0 \\
0 \\
1/2 \\
1/4
\end{matrix}\right),
$$
The result becomes $A_{0,0}=\frac{361}{1699}\approx 0.2125$. The two results add to slightly less than one because there is a nonzero probability that both players hit their goals at the same time... this probability is $81/1699\approx 0.0477$.
Best Answer
No need for infinite sums here, the answer is just $3\times E_1=6$. More broadly, the expected number for $n$ Heads is $2n$.
To see this, let $E_n$ be the expected number of tosses for $n$ Heads. We note that, to see $n$ Heads requires that you first see $n-1$, which you expect to take $E_{n-1}$ tosses. Then you need to see one more, which you expect to take $E_1$ tosses. Thus we have the recursion $$E_n=E_{n-1}+E_1$$
It follows, inductively, that $$E_n=n\times E_1$$
Since $E_1=2$ the claim follows.
For completeness, here is a proof that $E_1=2$:
Consider the first toss. Either it is $H$ or $T$. If it is $H$, you stop. If it is $T$ you restart (but you've added $1$ to the count). Thus $$E_1=\frac 12\times 1+\frac 12\times (E_1+1)\implies E_1=2$$
May be worth remarking that this gives another approach to the original question. Say we want to compute $E_n$. Then we consider one toss. Either it is $H$, in which case you want $E_{n-1}+1$ or it is $T$ in which case you want $E_n+1$. Thus $$E_n=\frac 12\times (E_{n-1}+1)+\frac 12\times (E_n+1)\implies E_n=E_{n-1}+2$$