How I can find the expected value of $G$? 
Suppose two teams play a series of games, each producing a winner and a loser, until one team
  has won two more games than the other. Let $G$ be the total number of games played. Assuming
  each team has chance $0.5$ to win each game, independent of results of the previous games. Find the expected value of $G$.

I think $G$ takes even values and I need to use negative binomial.But I am unable to find probability distribution and expectation. Please help.
 A: Let the required expectation be $a$. We assume without proof that $a$ is finite. (The proof is not hard.)
If the same team wins the first two games (probability $1/2)$, then the number of games, and hence the expected number, is $2$. Otherwise, $2$ games have been "wasted" and the expected number is $2+a$. It follows that
$$a=\frac{1}{2}(2)+\frac{1}{2}(2+a).$$
Solve for $a$.
A: The current net position (wins of team 1 minus wins of team 2) could be modeled as a simple 1-dimensional random walk. You are looking for the expected number of steps the walk takes before reaching $2$ or $-2$ (the absorbing states). In this case $G$ is referred to as the stopping time. 
A result (maybe not well known since I had to look it up again) gives the expected stopping time as $a*b$ where $a$ is the upper boundary and $-b$ the lower. Here, the expected stopping time is $4$. This conforms to @AndréNicolas answer.
A: Use the linearity of expectation. $G_n = X _1+X_2+X_3+\dots$ where $X_n = 2$ if the $n$-th 2-game set has to be played (i.e. each of the first $n-1$ 2-game sets is tied), $X_n = 0$ otherwise. Clearly $E(X_n) = 2(0.5)^{n-1}$, whence $E(G) = E(X_1)+E(X_2)+\dots=2+1+1/2+\dots=4$.
