A bag contains some silver balls and golden balls. If you remove one silver ball from the bag, 1/7 of the remaining balls in the bag are silver. If you remove 2 golden balls from the bag, then 1/5 of the remaining balls in the bag are silver. How many balls are there in the bag at first?

s + g in bag at first

s-1 = (1/7)(s+g-1)

s = (1/5)(s+g-2)