# What is the probability that a player with bankroll of x, flat betting y amount on odds z will bust before he can double his bankroll?

Have found the following question:

A player sits down at a roulette table with 20. He bets 1 at a time on either red or black. Either bet pays even money and has a probability of 9/19 of winning. What is the probability that the player makes a profit of 10 before losing all of his 20?

I think the question is pretty interesting. Here's the answer:

$$\frac{\left (\frac{1-p}{p} \right ) ^{20} - 1}{\left (\frac{1-p}{p} \right ) ^{30} - 1} =\frac{(10/9)^{20} - 1}{(10/9)^{30} - 1} \approx .3198$$

However I can not understand what represents what in this solution. Since this example question assumes payout 1:1 (since it is roulette) and that I am flat betting 1 dollars everytime. I want to try different combinations like betting 2 dollars, betting on different payouts etc. Can someone point me in the right direction?.