The first step to solve this question is to balance the given equation. To do it, make sure that the amount of every element is equal in both, reactants and products.
Now, use the stoichiometric ratio between the coefficients of potassium oxide and potassium nitride:
The answer is 4.66moles of magnessium nitride.