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.
Suppose you pay a trillion dollars to enter the game. The following table contains some of the values of the net payoff you can possibly end up with and the corresponding probabilities:
\begin{align*}
\begin{array}{rr}
1/2&-\,1\mathord{,}000\mathord{,}000\mathord{,}000\mathord{,}000\\
1/4&-\,999\mathord{,}999\mathord{,}999\mathord{,}998\\
1/8&-\,999\mathord{,}999\mathord{,}999\mathord{,}996\\
1/16&-\,999\mathord{,}999\mathord{,}999\mathord{,}992\\
\vdots\\
1/2^{10}&-\,999\mathord{,}999\mathord{,}999\mathord{,}488\\
\vdots\\
1/2^{20}&-\,999\mathord{,}999\mathord{,}475\mathord{,}712\\
\vdots\\
1/2^{30}&-\,999\mathord{,}463\mathord{,}129\mathord{,}088\\
\vdots\\
1/2^{40}&-\,450\mathord{,}244\mathord{,}186\mathord{,}112\\
1/2^{41}&99\mathord{,}511\mathord{,}627\mathord{,}776\\
1/2^{42}&1\mathord{,}199\mathord{,}023\mathord{,}255\mathord{,}552\\
\vdots\\
1/2^{50}&561\mathord{,}949\mathord{,}953\mathord{,}421\mathord{,}312\\
\vdots\\
1/2^{100}&633\mathord{,}825\mathord{,}300\mathord{,}114\mathord{,}114\mathord{,}699\mathord{,}748\mathord{,}351\mathord{,}602\mathord{,}688\\
\vdots\\
1/2^{200}&803\mathord{,}469\mathord{,}022\mathord{,}129\mathord{,}495\mathord{,}137\mathord{,}770\mathord{,}981\mathord{,}046\mathord{,}170\mathord{,}581\mathord{,}301\mathord{,}261\mathord{,}101\mathord{,}496\mathord{,}890\mathord{,}396\mathord{,}417\mathord{,}650\mathord{,}688\\
\vdots
\end{array}
\end{align*}
The paradox lies in the following observation. If you take out a loan of one trillion dollars to play this game, you will go bankrupt with a very large probability. However, once in a lifetime (not even of a human but of the universe) you win an unspeakably large amount of money, so large you can't even imagine.
In the light of this observation, a reasonable person would never play this game only once. It is worth playing only if you can play it indefinitely, while you have access to unlimited borrowing. What will happen is that you will keep playing for billions of years, accumulating an enormous debt using your infinite line of credit. But after a very long time, you will win so much money that is sufficient for you to pay off this large debt and still purchase the whole world. As @IanColey put it, this is because the chances of winning so much money are very, very tiny, but the payoffs associated with these very, very tiny probabilities are much, much, much more enormous than the probabilities are tiny.
Best Answer
This actually has been analyzed, at least from the point of view of the player who has the worst of things. The game you describe is equivalent to the following. Aplayer plays a game in a casino. His probability of winning is $p<\frac12.$ When he wins a bet, he wins the amount of the bet. He starts withs a bankroll $< 1$ and attempts to raise it to $1$. The idea is that he needs $1$ for some important purpose, and if he doesn't have it, he might as well have nothing.
So, on each bet, he bets either everything he has, if his bankroll is less than or equal to $1/2$ or just enough to raise his bank roll to 1, if he has more than $1/2,$ so if he has $.8,$ he bets $.2.$ Of course, he stops when he goes broke, or when he has raised his bankroll to $1.$
This was shown to be the best strategy in "How to Gamble if You Must," by Dubins and Savage. Let $f(x)$ be the probability of winning if the current bankroll is $x$. Then $$ f(x)=\cases{p+(1-p)f(2x-1),&$x\geq\frac12$\\ pf(2x),&$x<\frac12$} $$ Also of course, $f(0)=0, f(1)=1.$ It's easy to compute the values at the dyadic rationals. $f(.5)=p, f(.25)=p/2, f(.75)=(1+p)/2,$ etc.
I saw an analysis of $f$ somewhere years ago, and I can't remember where. It was in a popular science book, which only asserted the results, and I had to prove them for myself. If I recall correctly, $f$ is continuous and strictly increasing (no surprise there) but wildly non-differentiable. Of course, since it's monotonic, it must be differentiable almost everywhere, but what I think I remember is that it is not differentiable on any interval, and that the graph is not rectifiable.
Since any $0<x<1$ can be approximated arbitrarily closely by dyadic rationals, and $f$ can be computed exactly at dyadic rationals, $f(x)$ can be computed to any desired precision without simulation. Now that I think of it, there is a formula that computes $f(x)$ from the binary fraction for $x$. In that sense, there is a closed form formula.
The formula for $f$ is valid whether or nor $p<\frac12$ but I don't know how much of the analysis holds up in that case.
EDIT
I just realized that my memory is playing me false, at least in one respect. The function must be continuous and monotonic, so its graph cannot be unrectifiable. A monotonic function is of bounded variation, and according to Theorem 5.1 of this paper, a continuous function is of bounded variation if and only if its graph is rectifiable. I'm going to have to take some time to analyze this function.