The ratio of male to female pupils going on a skiing trip is 5:3. 4 male teachers and 9 female teachers are going on the trip. The ratio of people going on the trip, including teachers is 4:3. How many female pupils are going on the trip?
I understand to the point of getting m:f = $\frac{5}{3}$ and (m+4):(f+9) = $\frac{4}{3}$ and 3 x m =3m but I don't know how they got 5f and the rest of this equation - 3m = 5f and 3m + 12 = 4f+36 and 3m-4f = 24. Please can someone break it down and explain it if possible?