The correct order of acidic strength of the following :
III > IV > II > I
General thumb-rule: Carboxylic acids are more acidic than phenols and e−-donating groups decrease the acidic strength and e−-withdrawing groups increase the acidic strength.
The methyl group in p-toluic acid is electron-donating via hyperconjugation. Meaning, it increases the electron density of the benzene and thus would have a destabilizing effect (increases electronic charge) on the conjugate base of p-toluic acid. Hence, comparatively speaking, p-toluic acid is less acidic than benzoic acid. The chlorine atom in p-chlorophenol is electron-withdrawing by the more-pronounced inductive effect. Chlorine can also increase the electron density of the ring via conjugation but the inductive effect is more pronounced. Hence, phenol will be less acidic than p-chlorophenol.
The correct order of acidic strength is: III>IV>II>I