A sack contains yellow marbles and black marbles. If one marble is drawn at random, the probability that it is yellow is 7/8. Six yellow marbles are added to the sack. Now, if one marble is drawn, the probability that it is yellow is 9/10. How many yellow and black marbles were initially in the sack?

original bag

yellow marbles -- y
black marbles --b

so y/(y+b) = 7/8
8y = 7y + 7b
y = 7b

new bag:
yellow marbles -- y+6
black marbles --- b

(y+6)/(y+6+b) = 9/10
10y+60 = 9y+54+9b
y = 9b - 6

then 9b-6 = 7b
2b=6
b = 3
then y = 7(3) or 21

so there were 21 yellow and 3 black
for a total of 24 marbles

check:
Prob(yellow) = 21/24 = 7/8

new bag:
27 yellow, still 3 black, total 30
prob(yellow) = 27/30 = 9/10

how did you get a positive 6

In your question, didn't it say that 6 yellow marbles were added ????

To solve this problem, let's break it down step by step.

Let’s assume that the initial number of yellow marbles in the sack is Y and the initial number of black marbles is B.

Step 1: Probability of drawing a yellow marble from the initial sack
The probability of drawing a yellow marble from the initial sack is given as 7/8. This means that the number of yellow marbles (Y) in the sack is 7 and the total number of marbles (Y + B) is 8.

Step 2: Adding six yellow marbles to the sack
Six yellow marbles are added to the sack. This means that the number of yellow marbles in the sack becomes (7 + 6 = 13) and the total number of marbles becomes (8 + 6 = 14).

Step 3: Probability of drawing a yellow marble after adding six yellow marbles
The probability of drawing a yellow marble after adding six yellow marbles is now given as 9/10. This means that the number of yellow marbles (13) is 9 and the total number of marbles (14) is 10.

Step 4: Solving for the initial number of black marbles
To find the initial number of black marbles (B), we can subtract the initial number of yellow marbles (7) from the total number of marbles in the initial sack (8):
B = 8 - 7 = 1

Therefore, there were initially 7 yellow marbles and 1 black marble in the sack.