Potassium is in Group 1 so has one election to 'give' and Chlorine is in Group 7, so has 7 elections and wants to gain 1 election.
Represent Potassium's electron with a cross or a dot and Chlorine's 7 elections with the other. Pair the electrons up.
Magnesium is in Group 2 and Fluorine is in Group 7. Magnesium has 2 elections to 'give' and Fluorine has 1 to gain. Therefore there will be 2 Fluorines, each wanting one of Magnesium's 2 elections. Otherwise just draw as above.
edit: forgotton to say, you need to show the ions being formed. (A Potassium + ion and a Chlorine - ion, each in square brackets)
Potassium is in Group 1 so has one election to 'give' and Chlorine is in Group 7, so has 7 elections and wants to gain 1 election.
Represent Potassium's electron with a cross or a dot and Chlorine's 7 elections with the other. Pair the electrons up.
Magnesium is in Group 2 and Fluorine is in Group 7. Magnesium has 2 elections to 'give' and Fluorine has 1 to gain. Therefore there will be 2 Fluorines, each wanting one of Magnesium's 2 elections. Otherwise just draw as above.