
This figure is a standard parapet-and-terrace detail, and the fastest way to solve it is to fix the top-most label first and work down, since P being wrongly called a vent pipe in two of the four options is the easiest trap to spot.
Both options that respect the coping at the top of the parapet turn out to be fully correct, while both options that mislabel P as a vent pipe fail immediately.
Let's summarize:
So the correct options are (A) and (B).