See explanation below on information about how Oxygen and Nitrogen fill up their respective orbitals.
Work Step by Step
a) Oxygen has an atomic number of 8, meaning that it has a total of 8 electrons. Thus, filling up the orbitals in the proper order (1s, 2s, 2p). b) Nitrogen has an atomic number of 7, and has a total of 7 electrons. Therefore you fill up the orbitals (1s 2s 2p)