The formation of KCl (s) from K(s) and Cl2 (g) requires some elementary steps to accomplish this reaction, which will either require energy or liberate energy, depending on the step in the process.
The best way to approach this problem is to outline what must occur for this reaction to take place, THEN input the appropriate energies values, which you have listed.
1)In order for K(s) to react with Cl2 (g), it must enter into the gaseous phase, otherwise, this reaction would not be able to occur. This is where you consider the energy of sublimation: S ---> G. This will REQUIRE an input of energy, so the energy will be +90 kj/mole.
2) Since the product is KCl, this means only ONE Cl reacts. In order to achieve this, the bond between the two Cl atoms must be broken. Again, this is an endergonic (not favorable without an input of some energy) process and would require an input of energy, so +239 kj/mol
3) K(s) is going to transfer an electron to the Cl in this reaction. K(s)---> K+ and e-. This is the Ionization energy. This, too, will require an input of energy. So, +419 kj/mol
4) Cl will be accepting this electron because it has a high AFFINITY for it (It really wants a full octet!). Cl + e- ---> Cl-. This process is exergonic. Therefore -349 kj/mol.
5) Lastly, once you have produced the K+ and the Cl-, ionic bonding can occur due to the opposite charges. This is the lattice energy, the energy RELEASED when these ions join together. This, too, is exergonic, so -690 kj/mol.
Now, you must add all these energies up, taking into account the signs of the energies (+ or -). (+90 kj/mol)+(+239 kj/mol) +(+419 kj/mol) + (-349 kj/mol) + (-690 kj/mol)= -291 kj/mol. In total, this is an exergonic process, therefore it is favorable.