fairness problem. Probability without replacement I have this problem, X red marbles and Y blue marbles are placed in a container. Player A select 2 marbles without replacement. If the marbles are the same color, player A win. If the marbles are different color Player B wins. 
I need to find the values of X and Y, both between 20 and 30, that will allow player A and B have the same probability to win the game. 
I don't even know where to start! any hint would be appreciate! 
 A: Probability that $A$ wins is $\frac{\left(\begin{matrix}X \\ 2\end{matrix}\right) + \left(\begin{matrix}Y \\ 2\end{matrix}\right)}{\left(\begin{matrix}X+Y \\ 2\end{matrix}\right)}$. You want this to equal one half. So you get $\frac{X(X-1)+Y(Y-1)}{(X+Y)(X+Y-1)}=0.5$.
Solve.
A: Hints:  


*

*If the first marble picked is red, then there is a $\frac{Q_{R}-1}{Q_{R}+Q_{B}-1}$ chance of winning the game, a $\frac{Q_{B}}{Q_{R}+Q_{B}-1}$ chance of losing, and a $\frac{Q_{R}}{Q_{R}+Q_{B}}$ chance to pick a red marble first.

*If the first marble picked is blue, then there is a $\frac{Q_{B}-1}{Q_{R}+Q_{B}-1}$ chance of winning the game, and a $\frac{Q_{A}}{Q_{R}+Q_{B}-1}$ chance of losing, and a $\frac{Q_{B}}{Q_{R}+Q_{B}}$ chance to pick a blue marble first.

*The fractional chance of winning with the combination {$R, R$} is $(\frac{Q_{R}}{Q_{R}+Q_{B}})*(\frac{Q_{R}-1}{Q_{R}+Q_{B}-1})$, and your goal is for that plus the fractional chance to win with the combination {$B, B$} to simplify to $\frac{1}{2}$.
A: The probability of player A winning is $\frac{X(X-1)+Y(Y-1)}{(X+Y)(X+Y-1)}$.  We set this equal to $\frac12$.
This gives $2X(X-1)+2Y(Y-1)=(X+Y)(X+Y-1)$.
Then $2X^2-2X+2Y^2-2Y=X^2+XY-X+XY+Y^2-Y$.
Rearranging we get $X^2-2XY+Y^2=X+Y$.
That is, $(X-Y)^2=X+Y$.
So the total number of marbles, $X+Y$ is a perfect square.  From the constraints in the problem, $X+Y$ must be between $40$ and $60$.
This should let you deduce the total number of marbles; and perhaps you can make further progress from there.
