Suppose that two teams play a series of games that ends when one of them has won $i$ games. Suppose that each game played is, independently, won by team $A$ with probability $p .$ Find the expected number of games that are played when (a) $i=2$ and (b) $i=3 .$ Also, show in both cases that this number is maximized when $p=\frac{1}{2}$.