I don't undstand how the textbook come up with recursive forumulas.
For example,
Consider the following gambling game for two players, Black and White. Black puts $b$ black balls and White puts $w$ white balls in a box. Black and White take turns at drawing at random from the box, with replacement between draws until either Black wins by drawing a black ball or White wins by drawing a white ball. Supposed black draws first.
Calculate $P($Black wins$)$
Textbook Answer:
I'm not sure how they knew their equation encompasses all ways Black could win.
I going to assume this is their reasoning:
The first draw could only be be Black or White.
$P($Black wins$)$
$= P($Black wins$|B)P(B) + P($Black wins$|W)P(W)$, obviously this encompasses all ways Black could win.
$= P($Black wins$|B)P(B) + ( P($Black wins$|WW)P(WW) + P($Black wins$|WB)P(WB) )$
$= P($Black wins$|B)P(B)$ + ( 0 + $P($Black wins$|WB)P(WB) )$
$= P($Black wins$|B)P(B)$ + $P($Black wins$|WB)P(WB)$
?
And how to set-up recursive probability equations in general + when to use them?
Edit 1:
I used everyone's feedback and came up with an in-depth solution. I think the logic is sound. For anyone that need it:

