Synthesis, structure formation, and thermal expansion of A+M2+MgE4+(PO4)3