How to determine an unknown metal based on the reaction products with oxygen and fluorine?
Your answer is Magnesium. How you get there requires you to first realize that the number of moles of Fluorine is double the number of moles of Oxygen. Since Oxygen will accept 2 electrons and Fluorine will accept one electron, you can deduce based off oxidation states and the number of moles that this metal has a 2+ charge when it is a cation. From this, you can write your chemical equations out X+1/2O2-> XO and X+F2->XF2 . Moving on, you can do some basic  stoichiometry to determine you have .412 moles of X present and use that fact that X's mass is 10g to determine the molar mass of 24.272 g/mols. Then look at your Periodic Table to find what corresponds to 24.272 g/mol and Magnesium does. Hope this helps