The #"empirical formula"# is the simplest, whole number ratio defining constituent atoms in a species. The #"molecular formula"# is a whole number multiple of the #"empirical formula"#, and of course the multiple MIGHT be ONE.

And thus....#"molecular formula"=nxx{"empirical formula"}#

And we take the relevant masses...

#[(2xx12.011+4xx1.00794)*g*mol^-1]xxn-=underbrace(42.08*g*mol^-1)_"given molecular mass"#

And so we solve for #n# by the quotient....

#n=(42.08*g*mol^-1)/[1xx12.011+2xx1.00794*g*mol^-1]=3#

And so our molecular formula is #3xxCH_2-=C_3H_6#...this is propylene, or cyclopropane...