The correct option is B III>I>IV>II
Since the anions are same, we have to check the charge of the cations. Higher the charge on the cations, acidic nature will be higher. Here Mg2+ and Zn2+ having same charge however size of Mg2+ is smaller than Zn2+.
So, the correct of acidic strength is
P2O5>ZnO>MgO>K2O
III>I>IV>II