How to compare the bond lengths of an peroxide complex before and after oxidation?
The short and unpleasant answer is that we cannot derive the (spectroscopic) oxidation states based on theory alone. We need experiments (preferably crystal structures and some way to determine the oxidation states of cobalt which are accessible by experiment).



Oxidation states are unfortunately only easy for inorganic molecular compounds or simple salts. In your case, you have a bidentate bridging dioxygen ligand. This could be any of the species $\ce{O2, O2^.-, O2^2-}$ and potentially even more (with an even weaker oxygen–oxygen bond). This is what is called a noninnocent ligand: it can undergo redox chemistry with the central atom. The difficulties of finding out what the actual oxidation state is, is outlined in this question concerning the nature of the $\ce{Fe-O2}$ bond in haemoglobin.

For these cases, IUPAC has defined a formal oxidation state which can be derived according to a set of rules so that one may at least name the complex in oxidation nomenclature. In these rules, both the cyanido and the peroxido ligand would be seen as anions, peroxido being $\ce{O2^2-}$ and cyanido obviously $\ce{CN-}$. By considering the total charge of the $\ce{[Co2(CN)10\mu{-}(O2)]^6-}$ we can allocate cobalt an oxidation state of $\mathrm{+III}$ in the reactant where the maths adds up nicely.

Upon oxidation two things can happen:


one of the two cobalt ions supplies the electron, resulting in a decacyanido-&mu;-peroxidodicobaltate(II,III)
the peroxido bridge supplies the electron resulting in a superoxido complex with again two cobaltate(III) nuclei.


The resulting crystal structures would be indistinguishable except if one is able to synthesise both products and compare the bond lengths. Therefore, one must resort to other methods of determining the oxidation states. The most practicable way in my humble opinion would be to examine the UV/Vis spectra of the cobalt centres. These should remain low-spin due to the ten cyanido ligands. If we happen to have two $\mathrm{d^6}$, then cobalt was not oxidised. If one of the cobalt centres turns out to be $\mathrm{d^7}$ after the reaction, this should result in a noticable change from the original reactant spectrum.

In the absence of experimental evidence we need to resort to hidden clues in the question. You were asked to consider the oxygen–oxygen bond length. If the metal centre was oxidised, this should not change significantly. However, if the peroxido ligand was supplying the electron for oxidation, the bond order would increase when the species transforms from peroxido to superoxido and this should result in a reduced bond length.

Only with this meta-knowledge we can a posteriori deduce that oxygen’s oxidation state must have gone from $\mathrm{-I}$ to $-\frac12$.