Let the alkaline earth metal be A
$\therefore 3A+N_{2} \rightarrow A_{3}N_{2}$
$\Rightarrow \frac{Molecular\, mass\, of\, compd.}{Atomic \,mass\, of \,metal}=\frac{Wt. of compd.}{Wt. of metal}$
Let atomic mass of metal be x
$\Rightarrow $ Molecular mass of compound $= 3x + 28$
$\Rightarrow \frac{3x+28}{3x}=\frac{14.8}{12} \Rightarrow x=40$