How to calculate the energy to dissociate a bond into neutral atoms?
Your $\pu{640 kJ mol^-1}$ value is correct, so the next step is to neutralize the ions. First add an electron to a potassium ion to get a potassium atom. This releases $\pu{418 kJ mol^-1}$ because it is the reverse of the potassium atom ionization. Then take away an electron from fluoride ion to get a fluorine atom. This requires an input of $\pu{328 kJ mol^-1}$ because it is the reverse of the fluorine electron affinity. So the result is $\pu{550 kJ mol^-1}$, i.e., $\pu{640 kJ mol^-1}$ - $\pu{418 kJ mol^-1}$ + $\pu{328 kJ mol^-1}$.

This figure makes it clear:



Figure copyright information: D.W. Oxtoby, H.P. Gillis, L.J. Butler, Principles of Modern Chemistry, 8th Ed., Cengage Learning, Section 3.8, p. 87, © 2016 Cengage Learning.