Let A be the number of passengers when the bus leaves the terminal.
Number of passengers on the bus at the fist stop = 2A/3 + 16
Number of passengers on the bus at the second stop = 1/2 (2A/3 + 16) +7 = 3A/4
==> A/3 + 8 + 7 = 3A/4
==> A/3 + 15 = 3A/4
==> 3A/4 - A/3 = 15
==> 5A/12 = 15
==> A = 36
Let A be the total number of members.
Male members = A/2 + 3
Female members = A/3 + 4
A/2 + 3 + A/3 + 4 = A
(3A + 2A)/6 + 7 = A
5A/6 = A-7
5A = 6A - 42
A = 42