Due to the presence of electron- attracting group $(-NO_2)$ the phenoxide ion is stabilized (ie) acid strength of phenol is increased.
The presence of substituted in para position is more effective than in meta position.
The presence of an electron - releasing substituent $(-CH_3) $ destabilises the phenoxide ion and so decreases the acid strength of phenol.
So, $ IV > III > I > II $
Hence d is the correct answer.