This answer only examines the betting strategy the OP advocates (always bet half of what you have) and some of its variants. With this strategy:
One never gets broke (one's fortune is always positive). One doubles up almost surely if $p$ is large enough but with a probability which is less than $1$ if $p$ is small enough.
Note that there is no theorem saying that every positive submartingale reaches every level almost surely, hence arguments based on averages of increments only, cannot suffice to reach a conclusion.
In the strategy the OP advocates, the fortune performs a multiplicative random walk whose steps from $x$ are to go to $\frac32x$ and to $\frac12x$ with probability $p$ and $1-p$ respectively. Thus, the logarithm of the fortune performs a usual random walk with steps $\log\frac32$ and $\log\frac12$, whose constant drift is
$m(p)=p\log\frac32+(1-p)\log\frac12$ hence $m(p)=p\log3-\log2$ has the sign of $p-p^*$ where $p^*$ solves the equation $3^{p^*}=2$, hence $p^*=\frac{\log2}{\log3}=.6309...$
If $p\geqslant p^*$, $m(p)$ is nonnegative hence the logarithm of the fortune reaches the set $[C,+\infty)$ almost surely for every $C$. In particular, one doubles up almost surely.
If $p<p^*$, $m(p)$ is negative hence the logarithm of the fortune has a positive probability $q$ to never visit the set $[\log2,+\infty)$, for example. This means that with probability $q$, one will bet an infinite number of times without ever getting broke nor doubling up. In effect the fortune at time $k$ will go to zero like $a(p)^k$ when $k\to+\infty$, with $a(p)=\frac123^p<1$.
There is no easy formula for the probability $q$ to never double up but the probability to double up $n$ times decreases exponentially like $\exp(-b(p)n)$ when $n\to\infty$, where $b(p)$ is the unique positive solution of the equation $p(3^b-1)=2^b-1$.
If $p<p^*$, the strategy where one always bets half of what one has fails. What happens with the strategy where one always bets a proportion $r$ of what one has? The same analysis applies and shows that one doubles up almost surely, for every $p\geqslant\wp(r)$, where $p=\wp(r)$ solves the equation $(1+r)^{p}(1-r)^{1-p}=1$ (note that $\wp(\frac12)=p^*$).
The other way round, for every given $p>\frac12$, a strategy which wins almost surely is to bet a proportion $r$ of what one has, provided $p\geqslant\wp(r)$. Since $\wp(r)\searrow\frac12$ when $r\searrow0$, one gets:
For each $p>\frac12$, the strategy where one always bets a proportion $r$ of what one has wins almost surely for every small enough positive value of $r$ (for example, $r\leqslant 2p-1$).
Let's first look at the first question:
If you bet $1 on black for 100 consecutive spins, how much money will
you end up with in expectation?
So you want to know what your final return will be, at the end of 100 spins. Call this $R$. That is just giving it a name, but what is your final return? You can see that it is the sum of the returns from each bet. So let the return on the $i$th bet be $R_i$, then note that $R = R_1 + R_2 + \dots + R_{100}$. So the expected return is $E[R] = E[R_1] + E[R_2] + \dots + E[R_{100}]$ by linearity of expectation.
So to calculate $E[R]$, we'll be done if we calculate each $E[R_i]$. Let's try to calculate a particular $E[R_i]$. You bet $1$ dollar, and you get back $2$ if the ball lands on black, and $0$ if it doesn't. In other words, you gain $1$ dollar if it lands on black, and lose $1$ dollar if it doesn't. The probability of the former is $18/38$, and that of the latter is $20/38$. In other words, $R_i$ is $1$ with probability $18/38$, and $-1$ with probability $20/38$, so the expected value of $R_i$ is $E[R_i] = \frac{18}{38}(1) + \frac{20}{38}(-1) = \frac{-2}{38}$. Now, as this is the same for each $R_i$, we have $E[R] = E[R_1] + E[R_2] + \dots + E[R_{100}] = \left(\frac{-2}{38}\right)100 \approx -5.26$.
For the second question, let the amount you walk away with be $W$. Let $p = 18/38$, the probability that your bet on black succeeds. There are $5$ possible outcomes:
- you win your first bet: probability $p$
- you lose your first bet, and win your second: probability $(1-p)p$
- you lose your first two bets, and win the third: probability $(1-p)^2p$
- you lose your first three bets, and win the fourth: probability $(1-p)^3p$
- you lose all four bets: probability $(1-p)^4$
In the first four outcomes, you walk away with $16$ dollars, so the probability of that happening (let's call it $q$) is $q = p + (1-p)p + (1-p)^2p + (1-p)^3p = 1 - (1-p)^4 = 1 - (20/38)^4 \approx 0.92$.
[More simply, you could think of it as just two outcomes: (a) that you win some bet, which has probability $q = 1 - (1-p)^4$, and (b) that you win no bet (lose all bets), which has probability $(1-p)^4$.]
In other words, $W$ is $16$ with probability $q$, and $0$ with probability $1-q$. So the expected amount of money you walk away with is therefore $E[W] = q(16) + (1-q)0 = (1-(1-p)^4)16 \approx 14.77$.
[Aside: Note that this is less than the $15$ you came in with. This shows that you can't win in expectation even with your clever betting strategy; a consequence of the optional stopping theorem.]
Best Answer
One way which I think is standard in some applications is to maximise the expected logarithm of the ratio of outcome to original amount (this comes to the same thing as maximising the expected logarithm of the outcome, of course). The rationale for doing this is that if you have to make similar bets several times, each time wagering all your current capital, then the expected logarithm of the ratio of final outcome to starting capital is going to be the sum of the expected logarithm of the ratios for individual bets. Losing all your money is very bad because you can never recover from it.
However, doing this here gives another unexpected answer. The expected logarithm of the ratio is $$P(A)\log x+P(A)\log r_A+P(B)\log(100-x)+P(B)r_B-\log100.$$ Most of these terms are constant, and Gibbs' inequality implies that the best thing to do is to set $$x=100\times\frac{P(A)}{P(A)+P(B)},$$ which doesn't depend on the payouts!
This method applied to betting is called the "Kelly criterion".