There are (m+n)*(m+n−1)/2(m+n2)=(m+n)(m+n−1)2 ways to choose 22 marbles.
There are m*nmn ways to choose 22 marbles with different colours.
The probability of getting two marbles with different colours is therefore
So, the probability is 1212, if and only if
1) m=2 : n2+3n+2=8n1) m=2 : n2+3n+2=8n has no solution in NN
2) m=3 : n2+5n+6=12n2) m=3 : n2+5n+6=12n has the solutions 11 and 66.
3) m=6 : n2+11n+30=24n3) m=6 : n2+11n+30=24n has the solutions 33 and 1010.
4) m=10 : n2+19n+90=40n4) m=10 : n2+19n+90=40n has the solutions 66 and 1515.