SOLUTION : The bond length in a molecule depends on bond order. The higher the bond order, smaller will be the bond length.
Peroxide ion, ${O}_2^{2-}$ :
E.C.: $\sigma 1 s^2 \sigma^* 1 s^2 \sigma 2 s^2 \sigma^* 2 s^2 \sigma 2 p_z^2 \pi 2 p_x^2 \pi 2 p_y^2$. $\pi^* 2 p_x^2 \pi^* 2 p_y^2$
Bond order $=\frac{10-8}{2}=1$
Superoxide ion, ${O}_2^{-}$:
E.C.: $\sigma(1 s)^2 \sigma^{\star}(1 s)^2 \sigma(2 s)^2 \sigma^{\star}(2 s)^2 \sigma\left(2 p_z\right)^2 \pi\left(2 p_x\right)^2$ $\pi\left(2 p_y\right)^2 \pi^{\star}\left(2 p_x\right)^2 \pi^{\star}\left(2 p_y\right)^1$
Bond order $=\frac{10-7}{2}=1.5$
Bond order of superoxide is higher than peroxide ion, hence bond length of peroxide ion is larger.