Okay, I won't do every single one but i'll do a few so you can see how to work it out.
You want the charges to = 0 so that the compound is neutral.
Take Na+ and Cl-
This is a 1:1 ratio so you need 1 Na+ to balance the charges hence the equation is NaCl
For Na+ and CO2^3- the ratio is 1:3 so you need 3 Na
Na3CO2