This method is used to find the formula of an ionic compound. First you calculate the charges on the ions involved. You use their group number to find this. Then you lose the positive and negative signs, swap the charges between the metal and non-metal and drop the number to be at the bottom, behind the element. Finally you would simplify the ratio (e.g. for Mg2O2 we would just write MgO). Remembering to put brackets around any complex ions.