Lemme demonstrate it for the 3 ball case.

Code:

3 balls of different colors initially.
After:
1 draw:
2 same color, 1 different color
Probability = 1/1
3 same color
Probability = 0/1
2 draws:
2 same color, 1 different color
Probability = 2/3
3 same color
Probability = 1/3
3 draws:
2 same color, 1 different color
Probability = 2/3
3 same color
Probability = 1/3
.
.
.
n draws:
2 same color, 1 different color
Probability = 2/3
3 same color
Probability = 1/3

Simply add them all up and you get the expected number of draws to get all 3 balls the same color.

# draws = 1 draw * prob of 0 + 2 draws * prob of 1/3 + 3 draws * prob of 2/3 * prob 1/3 + ...

# draws = 1*0 + 2*1/3 + 3*2/3*1/3 + 4*(2/3)^2*1/3 + ... + n*(2/3)^(n-2)*1/3

You get the idea. You do know how to add this up don't you