What is the oxidation state of nitrogen in ammonium nitrate?
There are 2 different nitrogen atoms in $\ce{NH4NO3}$, one having oxidation number -3 and one with +5. They are different, having separate oxidation numbers independently of each other. It is perfectly fine to have several atoms of same element having different oxidation state in same compounds, for example in thiosulphate  $\ce{SO3S^{2-}}$ one (central) sulfur atom has oxidation number +4 and another has 0, and $\ce{Fe3O4}$ is actually $\ce{\overset{(II)}{Fe}\overset{(III)}{Fe2}O4}$ and many more.