We already know that the molar mass of Carbon (C) is 12.01g/mol, of Hydrogen (H) is 1.008 g/mol, of Oxygen (O) is 16g/mol.
If the molecular formula were exactly the same as the empirical formula, then it would have a molar mass of:
12.01g/mol+ 2*(1.008g/mol)+ 16g/mol= 30.03g/mol
But the actual molar mass of the molecular formula is 120.g/mol, which is 4 times as great as 30.03g/mol! Therefore, we have to multiply the empirical formula by 4, and the molecular formula of the compound is C4H8O4.
Hope this would help :))