The problem states:
You play a game, and each time you win with probability p. You plan to play 5 games. However, if you win on the 5th game, you must keep playing until you lose.
a) find the expected number of games that you play,
b) find the expected number of games that you lose,
a) you must play at least 5; to see the number of games beyond that, you need to find the expected value of the sum of X, where X is whether or not you win on your ith try, i>5.
I came up with p * sum(1 - p)^i = p/(1-p) (1 / ( 1 - (1 - p)) = 1 / (1 - p). Since you already played 5 games, and you also had to win on the 5th try, the final expected number of games should be:
5 + p / (1-p);
b) Given my horrid attempt at part (a), I have no idea where to turn for part (b). I'll post again tomorrow, after thinking through it some more.