The correct option is D Q<R<P
Due to ortho effect (steric inhibition to protonation), compound Q will be the weakest base. In both P and R, NO2 is at the para position which exhibits both −R and −I effects. Since the presence of two methyl groups at meta positions in P diminishes the −R effect of NO2 makes it the strongest base.
Hence the order will be: Q<R<P