you can set up a few fractions to represent the members.
(18/37) take math
(5/37) take math and chem
(8/37) take neither
assuming that the remaining members take chemistry only, you can find that by adding all of these fractions: 8 + 5 + 18 = 31, so 31/37 students fall into the listed categories (math only, chem and math, neither). there are 6 members remaining that would take chemistry only.