In this question the rule states that "in order to drink beer the person must be over 18 years of age". So we will consider the following options according to the rule:
For P it is given that his/her age is 16 years and since he/she is below 18 years of age, they cannot have beer so we have to check P's drink to see if the rule is followed.
For Q it is given that his/her age is 25 years and the rule states nothing about what anyone above 18 years cannot drink therefore there is no restriction on him/her. We do not need to check his/her drink.
For R it is given that he/she is having a milkshake. Now for milkshake also the rule puts no restriction therefore there is no need to check his/her age.
and finally for S it is given that he/she is having a beer and now since the rule clearly states that if anyone is having beer then he/she must be over 18 years of age therefore we need to check S's age.
So the correct option is Option B) We need to check P's drink and S's age