Somebody please solve this

A bag contains 5 red balls 4 blue balls and m green balls.Two balls are drawn at random from the bag.If probability of both being green is 1/7,then find m.

2 answers

so there are m+9 balls
prob(green,green) = (m/(m+9) (m-1)/(m+8) = 1/7
(m+9)(m+8) = 7m(m-1)
7m^2 - 7m = m^2 + 17m + 72
6m^2 - 24m - 72 = 0
we know m has to be a whole number, so this MUST factor, and sure enough

(m-6)(6m + 12) = 0

so m = 6 , or m = -2, the last is no good

so m=6
Thanks Nikhat