The correct option is
A I > II > III > IV
In general, whenever a group is present at ortho position of benzoic
acid, irrespective of its nature (EDG or EWG), it increases the acidic strength as compared to benzoic acid itself. Here in option (I) and (II) we have ortho effect which will increase the acidity of compounds than (III) and (IV).
Comparing (I) and (II), (I) is the most strong acid because it has more hydrogen bonding compare to other. The two OH group in ortho position make hydrogen bonding with carboxylate ion. This hydrogen bonding stabilise the conjugate base of this compoud.
In (I), one OH is present at one ortho position and it will have one hydrogen bonding with carboxylate ion.
Stability of conjugate base
∝ Strength of acid
Hence (I) is more acidic and than (II).
Comparing (III) and (IV), OH at meta position does not show mesomeric effect but -I effect will stabilise the negative charge on conjugate base. OH on para position show +M effect which will increase the negative charge on carboxylate ion and destabilise the conjugate base. Hence (III) is more acidic than (IV).
Thus, the correct order of acidity is
I > II > III > IV