can I get help with the MG row I’m having a hard time to understand

We are to match the cations along the low with the anions along the column to form a compound. The charge on the anions will determine the subscript of the cations.
The complete table is as shown below;