Start by writing the metal ion with its charge, followed by the nonmetal ion with its charge. Because the overall compound must be electrically neutral, decide how many of each ion is needed in order for the positive and negative charge to cancel each other out.