(N/A) $K$ and $S$:
The electronic configurations of $K$ and $S$ are as follows:
$K: 2, 8, 8, 1$
$S: 2, 8, 6$
Sulphur $(S)$ requires $2$ more electrons to complete its octet. Potassium $(K)$ requires one electron more than the nearest noble gas,i.e.,Argon. Two $K$ atoms transfer one electron each to one $S$ atom to form $2K^+$ and $S^{2-}$.
$(b)$ $Ca$ and $O$:
The electronic configurations of $Ca$ and $O$ are as follows:
$Ca: 2, 8, 8, 2$
$O: 2, 6$
Oxygen requires two electrons to complete its octet,whereas calcium has two electrons more than the nearest noble gas,i.e.,Argon. $Ca$ transfers two electrons to $O$ to form $Ca^{2+}$ and $O^{2-}$.
$(c)$ $Al$ and $N$:
The electronic configurations of $Al$ and $N$ are as follows:
$Al: 2, 8, 3$
$N: 2, 5$
Nitrogen is three electrons short of the nearest noble gas (Neon),whereas aluminium has three electrons more than Neon. $Al$ transfers three electrons to $N$ to form $Al^{3+}$ and $N^{3-}$.