Question: My urn contains 3 red, 2 green and 1 white ball. I pick a ball with replacement until I pick the second color. 

What is the average number of picks for picking the second color?

With the expected value formula I got the following.

$EX=\sum\limits\_{k=2}^\infty k[\frac{1}{2}r^{k-1}+\frac{2}{3}g^{k-1}+\frac{5}{6}w^{k-1}]$

Where r, g and w are the probabilites of drawing a red, green, or white ball.

I don't know how to calculate this sum, and I am not sure this is the right way to solve this excercise.

Answer: 
We discuss the probability based on the color of ball you first picked up. Then you continue to pick up the same color for totally $k-1$ time until you pick up another color at $k$th.

$E(X)=\sum\limits\_{k=2}^\infty k[(\frac{1}{2})^{k-1}\frac{1}{2}+(\frac{2}{6})^{k-1}\frac{4}{6}+(\frac{1}{6})^{k-1}\frac{5}{6}]$

To calculate the sum, the easiest way is to make use of the fact: for $|r|<1$, $\sum\limits\_{k=0}^\infty r^k=\frac{1}{1-r}$. Differentiate both sides, $\sum\limits\_{k=1}^\infty kr^{k-1}=\frac{1}{(1-r)^2}$. Then $\sum\limits\_{k=2}^\infty kr^{k-1}=\frac{1}{(1-r)^2}-1$
I assume you're interested in the expected number of picks *after the first*. In that case the answer is

$${1\over6}\cdot{6\over5}+{2\over6}\cdot{6\over4}+{3\over6}\cdot{6\over3}={1\over5}+{1\over2}+1={17\over10}$$

The reasoning is simple: In general, if an event happens with probability $p$, the expected number of trials it takes for it to occur is $1/p$. With probability $1/6$, the event of interest is picking a non-white ball, which occurs with probability $5/6$; with probability $2/6$, the event is picking a non-green ball, which occurs with probability $4/6$; and with probability $3/6$, the event is picking a non-red ball, which occurs with probability $3/6$.

If you are counting the first pick as well, the answer is simply $1+{17\over10}={27\over10}$.

To prove the general fact that $E(p)=1/p$, you can either set up and sum the infinite series $\sum\_{k=1}^\infty kp(1-p)^{k-1}$ or use the fact that after the first pick you're either done in one round, which happens with probability $p$, or, with probability $1-p$, you're back where you started, but with one round under you're belt, i.e.,

$$E(p)=p\cdot1+(1-p)(1+E(p))$$