Why aren't there 12-and-a-half balls in the bag? 
There are 25 red or green balls in a bag. Two are simultaneously selected at random. The probability of selecting two balls of the same color is the same as the probability of selecting two balls of different color. How many red balls are there in the bag?

I've tried:
$r + g = 25$
$P((r \cap r) \cup (g \cap g))=2P(r \cap g)$
$\therefore r^2+g^2=2rg \implies (r + g)^2 = 4rg\therefore 4rg=25^2=625\impliedby r+g=25$
$4rg=625$
$4r(25-r)=625\implies 4r^2-100r+625=0$
However, this gives me the answer $12.5$, which is clearly not correct.
What did I do wrong?
 A: Let $r,g$ be the number of red and green balls respectively. The probability of drawing two red balls in a row is
$$
\frac r{25}\frac {r-1}{24},
$$
and the probability of drawing a red ball followed by a green ball is
$$
\frac r{25}\frac g{24}.
$$
By the same computation for two green balls, and a green ball follows by a red ball, and by multiplying all terms by $25 \times 24$, you get the equation
$$
r(r-1) + g(g-1) = 2rg,
$$
not the equation $r^2 + g^2 = 2rg$, which you found. (Note that your equation is equivalent to $(r-g)^2 = 0$, so you could have seen even more quickly that that would not have worked.)
A: "What did I do wrong?"
You can't draw two balls simultaneously at the same time at random, you draw them actually one by one. The first ball is one out of 25, the second ball is one out of the remaining 24. Otherwise you would pick the same ball with both hands from time to time.
Or when you insist of selecting simulaneously, mathematically on the left side, you would need to exclude the case where two red or two green balls are actually a single ball. On the left side instead of rr and gg cases, you would need rr-r and gg-g cases, whereas the right side remains 2rg cases (because two balls of different colors are two balls). Please see that the remaining r+g cases select the same ball simultaneously. It leads to the same correct equation.
