We know the number of grams of each element, so the first step is to convert that into moles. So for nitrogen, 4.12g N x (1 mol N/14 g N) = 0.29 moles of N. For hydrogen, .88 g H x (1 mol H/1.01 g N) = 0.87 moles of H. The next step is to divide each by the smallest number of moles found. In this case, that is the .29 moles of N. So, for N, 0.29/0.29 = 1. For H, .88/.29 = 3. There is no need for further rounding, so the empirical formula is H3N1.