Step 1: Understand what burning in air means.
Air contains both oxygen and nitrogen. We need the pair of elements that, when burnt in air, form both an oxide and a nitride. Only sufficiently reactive metals combine with nitrogen as well as oxygen.
Step 2: Examine magnesium.
Magnesium burns brightly in air to give magnesium oxide and also reacts with nitrogen to give magnesium nitride. \[ 2Mg + O_2 \rightarrow 2MgO \] \[ 3Mg + N_2 \rightarrow Mg_3N_2 \] So magnesium forms both.
Step 3: Examine calcium.
Calcium, an active group 2 metal, similarly forms both an oxide and a nitride on burning. \[ 2Ca + O_2 \rightarrow 2CaO \] \[ 3Ca + N_2 \rightarrow Ca_3N_2 \] So calcium forms both.
Step 4: Check sodium.
Sodium burns in air to form mainly sodium peroxide $Na_2O_2$, but it does not readily form a nitride under these conditions, so pairs containing sodium are ruled out.
Step 5: Check beryllium and manganese.
Beryllium is quite unreactive towards nitrogen on simple burning, so the pairs with beryllium do not satisfy the condition for both products.
Step 6: State the answer.
The pair forming both oxides and nitrides on burning in air is magnesium and calcium, matching the key.
\[ \boxed{Mg,\; Ca} \]