Alice and Bob both need to buy a bicycle. The bike store has a stock of four green, three yellow, and two red bikes. Alice randomly picks one of the bikes and buys it. Immediately after, Bob does the same. ... Let A be the event that Alice bought a green bike, and B be the event that Bob bought a green bike. a. (5 points) What is P(A)? What is P(A|B)? Solution: We have P(A) = 4/9 (4 green bikes out of 9), and P(A|B) = 3/8 (since we know that Bob has a green bike, Alice can have one of 3 green bikes out of the remaining 8).
Since Bob buys his bike after Alice how can it affect the number of green bikes Alice has to choose and the total number of bikes? Alice goes first so how can Bob's subsequent choice affect the probability of what she did in the past? Or is this just a typo, i.e. it means to ask P(B|A) which I agree would be 3/8.
The answer is correct: If we know Bob bought a green bike, then there are only three other green bikes that Alice could have bought out of the eight bikes Bob didn't buy. Thus the probability that Alice bought a green bike given we know Bob bought a green bike is $3/8$.
It is not that Bob's subsequent choice is affecting what Alice did in the past. It is that knowing Bob's choice gives us information about what Alice did in the past. The fact that Bob also happened to buy a green bike, when choosing randomly, makes it less likely that Alice had (because, symmetrically, when Alice buys a green bike, it is less likely that Bob would buy a green bike randomly).
Note that $P(B|A)=P(A|B)$ here. The order Alice and Bob buy bikes does not matter.
A simpler example to illustrate the point: Suppose that the bike store had one green bike and one red bike. Then: