A bag contains 5 red, 4 blue and an unknown number of m green balls.

Two balls are drawn. If probability of both being green is 1/7 find m.

I will assume the first ball drawn is NOT returned.

prob(2green) = (n/(9+n) * ((n-1)/(8+n)) = 1/7

7n^2 - 7n = n^2 + 17n + 72
6n^2 - 24n - 72 = 0
n^2 - 4n - 12 = 0
(n-6)(n+2) = 0
n = 6 or n = a negative, which is no good

there were 6 green balls

check:
prob(2greens) = (6/15)(5/14) = 1/7

Let's solve this step-by-step.

Step 1: Determine the total number of balls in the bag.
We know that the bag contains 5 red balls, 4 blue balls, and an unknown number of green balls. Therefore, the total number of balls in the bag is 5 + 4 + m.

Step 2: Calculate the probability of drawing a green ball on the first draw.
The probability of drawing a green ball on the first draw can be calculated by dividing the number of green balls (m) by the total number of balls in the bag (5 + 4 + m). Therefore, the probability is m / (5 + 4 + m).

Step 3: Calculate the probability of drawing a green ball on the second draw.
After the first ball is drawn, we're left with one green ball and m - 1 total balls (since we already drew one ball). Therefore, the probability of drawing a green ball on the second draw is 1 / (m - 1).

Step 4: Calculate the joint probability of drawing two green balls.
The joint probability of drawing two green balls is the product of the probabilities of drawing a green ball on the first and second draws. Therefore, the joint probability is:

(m / (5 + 4 + m)) * (1 / (m - 1))

We know that the joint probability is given as 1/7. Therefore, we can set up the equation:

(m / (5 + 4 + m)) * (1 / (m - 1)) = 1/7

Step 5: Solve the equation for m.
To solve for m, we can cross-multiply and simplify the equation:

m * 1 = (5 + 4 + m) * (1 / 7) * (m - 1)
m = (9 + m) * (m - 1) / 7

Expanding the equation:

m = (9m - 9 + m^2 - m) / 7
m = (m^2 + 8m - 9) / 7

Multiplying both sides by 7 to eliminate the denominator:

7m = m^2 + 8m - 9

Rearranging the equation:

m^2 + 8m - 7m - 9 = 0
m^2 + m - 9 = 0

This is a quadratic equation. We can solve it by factoring or using the quadratic formula. In this case, it doesn't factor nicely, so let's use the quadratic formula:

m = (-b ± √(b^2 - 4ac)) / (2a)

Where a = 1, b = 1, and c = -9:

m = (-(1) ± √((1)^2 - 4(1)(-9))) / (2(1))
m = (-1 ± √(1 + 36)) / 2
m = (-1 ± √37) / 2

Using the positive square root:

m ≈ (-1 + √37) / 2

Therefore, the value of m is approximately (-1 + √37) / 2.

To find the value of m, you can use the concept of probability.

Let's break down the problem step by step:

1. Total number of balls in the bag: 5 red + 4 blue + m green = 9 + m

2. We want to find the probability of drawing two green balls out of the bag. The first green ball has a probability of (m/(9+m)), since we have m green balls out of a total of (9+m) balls.

3. After removing one green ball, we are left with (m-1) green balls in the bag. Now, the probability of drawing a second green ball from the remaining green balls would be ((m-1)/(9+m-1)).

4. According to the problem, the probability of drawing two green balls is given as 1/7. Therefore, we can set up the equation:
(m/(9+m)) * ((m-1)/(9+m-1)) = 1/7

5. Simplifying this equation, we get:
m^2 - 9m + 14 = 0

6. Now, we can solve the quadratic equation to find the value of m.

Using the quadratic formula:
m = [ -(-9) ± sqrt((-9)^2 - 4(1)(14))] / (2*1)
m = [ 9 ± sqrt(81 - 56)] / 2
m = [ 9 ± sqrt(25)] / 2
m = [ 9 ± 5] / 2

Therefore, we have two solutions for m: m = 7 and m = 2. However, we need to choose the positive value that satisfies the given condition. Therefore, m = 7.

Hence, the unknown number of green balls, m, is 7.