Mean number of balls drawn 
An urn contains $R$ red balls and $G$ green balls. Suppose you draw balls with replacement until you get your first red ball. Find the mean number of balls drawn.

Attempted solution: Let $X$ be the number of draws until we draw a red ball. The probability of choosing a red ball is
$$\frac{R}{R+G}$$
I am not sure how to get the pmf of this question. Any suggestions is greatly appreciated.
 A: The number of balls drawn follows a geometric distribution starting from 1 with success probability $p=\frac R{R+G}$. The expected value of this distribution (the mean number of balls drawn) is
$$\sum_{k=1}^\infty(1-p)^{k-1}pk=\frac p{p^2}=\frac1p=\frac{R+G}R.$$
A: Let $X$ denote the number of draws until we draw a red ball. Since we are performing this experiment WITH replacement, the successive trials are mutually independent. So, 
$$P(X=1) = \frac{R}{R+G},$$
$$P(X=2) = \frac{GR}{(R+G)^2},$$
$$P(X=3) = \frac{G^2R}{(R+G)^3},$$
and so on
$$P(X=x) = \frac{G^{x-1}R}{(R+G)^x}.$$
Now the expected value of $X$ is found as follows: 
$$E(X) = \sum_{x=1}^\infty x \frac{G^{x-1}R}{(R+G)^x} = \frac{R}{G} \sum_{x=1}^\infty x \left( \frac{G}{R+G} \right)^x \\ = \frac{R}{G} \left( \frac{G}{R+G} \right) \sum_{x=1}^\infty x \left( \frac{G}{R+G} \right)^{x-1} \\ =  \frac{ \frac{R}{R+G} }{ \left(1 - \frac{G}{R+G} \right)^2} = \frac{R+G}{R} = 1+ \frac{G}{R}. $$
Hope I'm making sense and this calculation is correct. 
A: 
I am not sure how to get the pmf of this question. 

To have $X=k$ you must draw $k-1$ consecutive blue balls and then $1$ red ball.   Thus the probability of this event is: 
$$\mathsf P(X=k)= \Bigl(\frac{B}{R+B}\Bigr)^{k-1}\Bigl(\frac{R}{R+B}\Bigr) = 
\frac{B^{k-1}R}{(R+B)^k}\quad\Bigl[k\in\{1,2,\ldots\}\Bigr]$$
A: Let $X$ denote the number of balls drawn and let $G,R$ denote the events that the first ball drawn is green respectively red.
$$\mathbb EX=\mathbb E(X\mid R)\Pr(R)+\mathbb E(X\mid G)\Pr(G)$$
Observe that: $$\mathbb E(X\mid R)=1$$
(you are ready after one draw)
and: $$\mathbb E(X\mid G)=1+\mathbb EX$$
(with one draw done the game starts over) 
leading to:
$$\mathbb EX=1+\mathbb EX\frac{G}{R+G}$$
and consequently:$$\mathbb EX=\frac{R+G}{R}=1+\frac{G}{R}$$
