Answer: +4
Explanation:
Firstly, we know that Oxygen should have an oxidation number of -2. This is because according to oxidation rules, Oxygen's number will always be -2 unless it is a part of a peroxide and then it will be -1 (ex: H2O2). UO2 is not a peroxide, so the regular rules will apply.
We also know that oxidation numbers in a molecule with no charge should add up to zero. There are two oxygen molecules which makes their total oxidation numbers equal to -4. Therefore, whatever U's oxidation number is should cancel out that -4 to make the total number 0.
So, U's oxidation number should be +4 since -4+4=0.