Once $A$ has finished playing, ending with an amount $a$, the strategy for $B$ is simple and well-known: Use bold play.
That is, aim for a target sum of $a+\epsilon$ and bet what is needed to reach this goal exactly or bet all, whatever is less. As seen for example here, the probability of $B$ reaching this target is maximized by this strategy and depends only on the initial proportion $\alpha:=\frac{100}{a+\epsilon}\in(0,1)$. (Of course, $B$ wins immediately if $a<100$). While the function $p(\alpha)$ that returns $B$'s winning probability is fractal and depends on the dyadic expansion of the number $\alpha$, we can for simplicyity (or a first approximate analysis) assume that $p(\alpha)=\alpha$: If the coin were fair, we would indeed have $p(\alpha)=\alpha$, and the coin is quite close to being fair.
Also, we drop the $\epsilon$ as $B$ may chose it arbitrarily small. (This is the same as saying that $B$ wins in case of a tie).
In view of this, what should $A$ do?
If $A$ does not play at all, $B$ wins with probability $\approx 1$.
If $A$ decides to bet $x$ once and then stop, $B$ wins if either $A$ loses ($p=0.51$) and $B$ wins immediately or if $A$ wins $p=0.49$ and then $B$ wins (as seen above) with $p(\frac{100}{100+x})\approx \frac{100}{100+x}$. So if $A$ decides beforehand to play only once, she better bet all she has and thus wins the grand prize with probaility $\approx 0.49\cdot(1-p(\frac12))\approx \frac14$.
Assume $A$ wins the first round and has $200$. What is the best decision to do now?
Betting $x<100$ will result in a winning probability of approximately
$$0.49\cdot(1-\frac{100}{200+x})+0.51\cdot(1- \frac{100}{200-x}) $$
It looks like the best to do is stop playing (with winning probability $\approx\frac12$ now).
Alernatively, let us assume instead that $A$ employs bold play as well with a target sum $T>100$. Then the probability of reaching the target is $\approx \frac{100}{T}$, so the total probability of $A$ winning is approximately
$$ \frac{100}T\cdot(1-\frac{100}T)$$
and this is maximized precisely when $T=200$.
This repeats what we suspect from above:
The optimal strategy for $A$ is to play once and try to double, resulting in a winning probability $\approx \frac14$.
Admittedly, the optimality of this strategy for $A$ is not rigorously shown and especially there may be some gains from exploiting the detailed shape of $B$'s winnign probability function, but I am pretty sure this is a not-too-bad approximation.
Let $x$ denote player $A$'s score before a toss.
There are two strategies to consider . . .
- Player $A$ doubles only at $x=1$.$\\[4pt]$
- Player $A$ doubles at both $x=0\;$and $x=1$.
First suppose player $A$ doubles only at $x=1$.
Let $W_k$ be the probability that player $A$ wins exactly $2^k$, and let $L_k$ be the probability that player $A$ loses exactly $2^k$.
Starting at $x=0$, let $p$ be the probability of reaching $x=1$ before reaching $x=-2$.
It's easily shown that $p={\large{\frac{2}{3}}}$.
There's no way for $A$ to win exactly $1$, hence $W_0=0$.
For $A$ to lose exactly $1$, the score, starting at $x=0$, must reach $x=-2$ before reaching $x=1$, hence $L_0=1-p={\large{\frac{1}{3}}}$.
For $A$ to win exactly $2$, the score, starting at $x=0$, must reach $x=1$ before reaching $x=-2$, and once reaching $x=1$, the next toss must be $\text{H},\;$hence
$W_1=(p)\bigl({\large{\frac{1}{2}}}\bigr)=\bigl({\large{\frac{2}{3}}}\bigr)\bigl({\large{\frac{1}{2}}}\bigr)={\large{\frac{1}{3}}}$.
Considering the $2$-toss sequences $\text{TH},\text{HT},\;$we get the recursion
$$
\begin{cases}
W_k=\frac{1}{4}W_k+\frac{1}{4}W_{k-1}&\text{for}\;k\ge 2\\[4pt]
L_k=\frac{1}{4}L_k+\frac{1}{4}L_{k-1}&\text{for}\;k\ge 1\\
\end{cases}
$$
or equivalently,
$$
\begin{cases}
W_k=\frac{1}{3}W_{k-1}&\text{for}\;k\ge 2\\[4pt]
L_k=\frac{1}{3}L_{k-1}&\text{for}\;k\ge 1\\
\end{cases}
$$
It follows that
$$
\begin{cases}
W_0=0\\[4pt]
W_k=\left(\frac{1}{3}\right)^k&\text{if}\;k\ge 1\\[4pt]
L_k=\left(\frac{1}{3}\right)^{k+1}&\text{if}\;k\ge 0\\
\end{cases}
$$
Letting $e$ denote $A$'s expectation using this strategy, we get
\begin{align*}
e&=
\sum_{k=0}^{\infty}\left(W_k\right)\left(2^k\right)
-
\sum_{k=0}^{\infty}\left(L_k\right)\left(2^k\right)\\[4pt]
&=
\sum_{k=1}^{\infty}\left({\small{\frac{2}{3}}}\right)^k
-
\left({\small{\frac{1}{3}}}\right)\sum_{k=0}^{\infty}\left({\small{\frac{2}{3}}}\right)^k\\[4pt]
&=2-1\\[4pt]
&=1
\end{align*}
Next, suppose player $A$ doubles at both $x=0$ and $x=1$.
Using this strategy, let $e$ be player $A$'s expectation.
For sequences of $2n$ tosses where the game ends on toss $2n$, there is a one-to-one correspondence between sequences where $A$ loses, and sequences where $A$ wins, obtained by using the exact same toss sequence except reversing the last two tosses from $\text{TT}$ to $\text{HH}$. Call such sequences conjugates of each other. But for any pair of conjugate sequences, if the losing one loses $2^k$, the winning one wins $2^{k+1}$, hence the conditional expectation, given that the game ends after $2n$ tosses, is positive.
It follows that $e > 0$ (possibly positive infinity).
Suppose $e$ is finite.
Starting at $x=0$, and considering the $2$-toss sequences $\text{TT},\text{TH},\text{HT},\text{HH}$, we get the recursion
$$e=\left(\small{\frac{1}{4}}\right)(-2)+\left(\small{\frac{1}{4}}\right)(2e)+\left(\small{\frac{1}{4}}\right)(4e)+\left(\small{\frac{1}{4}}\right)(4)$$
which yields $e=-1$, contrary to $e > 0$.
It follows that $e=+\infty$.
Thus, if the goal is to maximize expectation, then doubling at both $x=0$ and $x=1$ is optimal.
But the conjugate of a big win is a big loss (though only half as much), so this strategy, though it has expectation positive infinity, and offers the potential for huge gains, also risks huge losses.
Best Answer
Knowing that the 6th coin flip is still 50-50 and completely independent from the last 5 should make the entire intro of your question void. You should ask - is it worth borrowing \$100 in order to have a 50-50 chance of winning an additional \$100. Everything else is just just noise.
To answer this just think about the simple goal of maximising the probability of future prosperity. So if you owe another lender \$100 and they will kill you in an hour if you don't repay them - then take the risk and you have a 50-50 chance of living (yay!). However, if you are not in harsh debt and the loan shark will kill you if you don't pay them back tomorrow then you are taking a 50-50 chance of getting murdered (bad idea!).
I know this was not a very 'mathsy' answer, but neither was the question :P