So the unbalanced equation would be Mg + N^2 --> Mg^3N^2
Which means the balanced equation would be 3Mg + N^2 --> Mg^3N^2
This is balance the equation out since you now has 3 magnesium and 2 nitrogen on the left side, and 3 magnesium on 2 nitrogen on the right. Double check my work though, it's been awhile.