We start with a #2.50*g# of stuff. And we interrogate its ATOMIC composition by combustion....
#"Moles of carbon dioxide"=(6.78*g)/(44.01*g*mol^-1)=0.154*mol#............ and THEREFORE there are ..........#0.154*molxx12.011*g*mol^-1=1.850*g# with respect to the mass of carbon.
#"Moles of water"=(1.94*g)/(18.01*g*mol^-1)=0.1077*mol# with respect to water, and THEREFORE there are ..........#2xx0.1077*molxx1.00794*g*mol^-1=0.2172*g# with respect to the mass of hydrogen.
And so there were #0.2172*g+1.850*g=2.067*g# accounted for with respect to the initial mass of #2.50*g#...the balance..#2.50*g-2.067*g=0.4329*g# MUST represent the mass of nitrogen (by the boundary conditions of the problem)...i.e. a molar quantity of #(0.4329*g)/(14.01*g*mol^-1)=0.03090*mol#.
And so we divide thru by the SMALLEST molar quantity (of nitrogen) to get to the empirical formula...the which is the simplest whole number ratio defining constituent atoms in a species....
#C_((0.1540*mol)/(0.03090*mol))H_((0.2154*mol)/(0.03090*mol))N_((0.03090*mol)/(0.03090*mol))=C_(4.98)H_(6.97)N-=C_5H_7N#
Now it is a fact that the #"molecular formula"# is a whole number multiple of the #"empirical formula"#, but we were quoted the molecular mass...
And so #{5xx12.011+7xx1.0094+14.01}_n*g*mol^-1=81*g*mol^-1#
...clearly...#n=1#...and the #"molecular formula"-=C_5H_7N#