Answer: 6 or 9
Step-by-step explanation:
Given the following :
Let the number of green pens = x
Number of red pens = x + 3
Probability of picking same color = 17/35
Taking two pens at random; probability of picking two pens of same color.
Probability of picking red on first pick then red on second pick ; or picking blue on first pick then blue on second pick
Probability = (Required outcome / Total possible outcomes)
Total number of pens = x + x + 3 = 2x + 3
Probability of picking red then red:
P(red first) = (x+3)/2x+3
P(red second) = x+3-1 / 2x+3-1 = (x+2)/2x+2)
Therefore, probability of red then red =
(x+3)/(2x+3) × (x+2)/2x+2)
= (x+3)(x+2) / (2x+3)(2x+2)
Probability of green then green:
P(first green) = x/(2x+3)
P(second green) = (x-1) / (2x+3-1) = (x-1) / (2x+2)
P(green then green) = x(x-1)/(2x+3)(2x+2)
Therefore,
[(x+3)(x+2) / (2x+3)(2x+2)] + [x(x-1)/(2x+3)(2x+2)] = 17/35
(x+3)(x+2)+x(x-1) / (2x+3)(2x+2) = 17/35
Cross multiply :
35(x+3)(x+2)+x(x-1) = 17(2x+3)(2x+2)
35(2x^2 + 4x + 6) = 17(4x^2 + 10x + 6)
70x^2 + 140x + 210 = 68x^2 + 170x + 102
70x^2 - 68x^2 + 140x - 170x + 210 - 102 = 0
2x^2 - 30x + 108 = 0
Now we have a quadratic equation which can be factoeized used using any known factorization method.
Factorizing this, we get
(x-6) = 0 or (x-9) = 0
x = 6 or x = 9