1) identify which element is the cation and which is the anion (use the group number of a main group element to determine the charge)
2) Determine how many of each ion type is needed for an overall charge of zero.
3) To write the formula, place the cation first and then the anion, and omit charges. (Use subscripts to show the number of each ion needed to have zero overall charge)