I have a problem in realizing the World Series solution. The World Series is a seven-game series that terminates as soon as either team wins four games. Let X be the random variable that represents the outcome of a World Series between teams A & B; Possible values of X are AAAA, BABABAB and BBBAAA. Let Y be the number of games played, which ranges from 4 to 7. Now we want H(X) and Y(X|Y) . ( H(X) is the entropy of X).
My problem is in the first part of solution. Can anyone explain this part for me:

In order to compute the entropy of $X$, you must enumerate its possible outcomes and the corresponding probabilities. Note that the possible $X$ events correspond to either $Y=4,5,6,$ or $7$. The enumeration goes as follows: