Here are the key steps to solve this conditional probability problem:
1) We are given that there are 21 boys and 15 girls in the class, for a total of 36 pupils
2) We are told that 3 boys and 5 girls wear glasses, for a total of 8 pupils who wear glasses
3) The probability we want is the probability a pupil is a boy, given that the pupil wears glasses
4) Using the definition of conditional probability:
P(Boy | Wears glasses) = P(Boy and wears glasses) / P(Wears glasses)
5) P(Boy and wears glasses) is the number of boy pupils who wear glasses, which is 3
6) P(Wears glasses)