Magnesium
Explanation:
An ionic compound is a metal + a nonmetal
Since phosphorus is a nonmetal, you need a metal
Carbon is a nonmetal so it’s not carbon
Oxygen is also a nonmetal so it’s not oxygen
Boron is also a nonmetal so it’s not boron
Magnesium is a metal