The empirical formula of a compound is the smallest whole-number ratio of atoms in a molecule, and the molecular formula shows the actual number of each type of atom in the molecule. The molecular formula is a whole number multiple of the empirical formula, so the molar mass of the compound is that same multiple of the molar mass of the empirical formula.
So to solve this you divide the given molar mass by the molar mass of the empirical formula and multiply the empirical formula by the number you get:
Molar mass of `CH_2O`= 12+2+16 = 30
120/30 = 4, so we multiply the empirical formula by 4:
Molecular formula = 4 x `CH_2O` = `C_4H_8O_4`
Sometimes the empirical formula and molecular formula of a compound are the same. When this is the case the molar mass of the empirical formula will be the same as that given for the molecular formula.