Calculate the empirical formula of each compound from the mass-composition data given below.

A)41%N and 59%O
B)45%Na,23%P and 32%O

Take a 100 g sample. For the first one that gives us 41 g N and 59 g O

Convert g to moles. moles = g/molar mass

moles N = 41/14 = 2.93
moles O = 59/16 = 3.69

Now find the ratio of the elements to each other. The easy way to do this is to divide the smaller number by itself so you know that will be 1.000. Then divide the other number by the same small number.
N = 2.93/2.93 = 1.00
O = 3.69/2.93 = 1.26
Then we usually round to a whole number and the values shown are the subscripts; HOWEVER, we can't round too much. That is, we could round a number like 2.05 or 2.1 to 2.0 or 3.9 or 3.95 to 4.0 BUT we can round 1.26 to 1. (I happened to pick one that is harder to find the ratio.:-).
So what we do is multiply each number by whole numbers until we find one that produces two whole numbers. For example, multiplying by 2 gives is 2.0 and 2.52. no good.
Multiply by 3 gives us 3.0 and 3.78. no good.
Multiply by 4 gives us 4.0 and 5.04. We can round that to 4.0 and 5.0. Yay!!. So we have N2O5 for the empirical formula.