The ratio of green balls to yellow balls in a bag is $3: 7$. When 9 balls of each colour are removed, the ratio of green balls to yellow balls becomes $1: 3$. How many balls were originally in the bag?
(A) 60
(B) 90
(C) 100
(D) 70
(E) 80
Originally, the ratio of green balls to yellow balls in the bag was $3: 7$.

This means that for every 3 green balls in the bag, there were 7 yellow balls.

Equivalently, if there were $3 n$ green balls, then there were $7 n$ yellow balls where $n$ is a positive integer.

After 9 balls of each colour are removed, the number of green balls in the bag is $3 n-9$ and the number of yellow balls is $7 n-9$.

At this point, the ratio of green balls to yellow balls is $1: 3$, and so 3 times the number of green balls is equal to the number of yellow balls.

Multiplying the number of green balls by 3 , we get $3 \times 3 n-3 \times 9$ or $9 n-27$ green balls.

Solving the equation $9 n-27=7 n-9$, we get $9 n-7 n=27-9$ or $2 n=18$, and so $n=9$.

Originally, there were $3 n$ green balls and $7 n$ yellow balls, for a total of $3 n+7 n=10 n$ which is $10 \times 9=90$ balls.

Note: If there were 90 balls, then 27 were green and 63 were yellow (since $27: 63=3: 7$ and $27+63=90$ ). After 9 balls of each colour are removed, the ratio of green balls to yellow balls becomes $18: 54=1: 3$, as required.

ANSWER: (B)