the first player to win three games in a row or a total of four games wins. In  a   competition between players X and   Y,  the first   player  to  win three   games   in  a   row or  a   total
of  four    games   wins.
a. How  many    ways    can the competition be  played  in  total?
b. How  many    ways    can the competition be  played  if  X wins  the first   game    and Y wins  the 
second  and third   games?

Suppose four games are played and one player wins them all.  WWWW.  There are 2 ways that can happen.  (Either one player wins all four or the other player does.
Suppose five games are played and one player winning 4 and losing one.  LWWW or WLWW or WWLW.  The winner can't lose the last game (because then the winner would have already won four games and they'd never play the fifth game).  So there are three choices for the winner to lose.  That's ${3 \choose 1}$.  And then there are 2 possible winners so $2{3 \choose 1}$ 
Suppose six games are played, one player wins 4 and loses two.  There are ${4 \choose 2}$ to do this and two players. $2{4 \choose 2}$.
Suppose seven games... winner wins 4 loses 3.  $2{5 \choose 3}$.
Total; $2 + 2{3 \choose 1}+ 2{4 \choose 2} + 2{5 \choose 3}$.
