Every musician in the band plays either the fife or the drum (but not both). The ratio of fifers to drummers is 7 : 1. If 2 drummers join the group and 6 fifers quit, the ratio of fifers to drummers would be 3 : 1. How many musicians were in the original ensemble?

f/d = 7

(f-6)/(d+2) = 3
so
(7d-6)/(d+2) = 3
d = 3, so f = 21
the total is 24
check: 15/5 = 3 ✓