The formula of first oxide is XO2 which means one mole of X contains 2 mole of oxygen. For second oxide, there is 40% of (X) which means there is 60% of oxygen. Now, for 40% of X, we have 2×60%=80% of oxygen, The moles of oxygen for 100% of X can be calculated as: Moles‌of‌oxygen=
2×60
4
=3‌moles Therefore, the formula of second oxide will be XO3.