Solution:
Concept: The number of valence (outermost) electrons decides how an atom bonds. A metal atom (1 to 3 valence electrons) and a non-metal atom (5 to 7) form an electrovalent bond by transfer of electrons; two non-metal atoms form a covalent bond by sharing pairs of electrons. Hydrogen (1 electron) needs one more for a duplet.
Step 1 — Identify each element from its configuration.
We count the electrons in the outermost shell of each atom and use the total to name it:
| Element | Configuration | Valence electrons | Atomic number | Element is | Type |
|---|
| W | 2, 8, 1 | 1 | 11 | sodium | metal: loses 1 |
| X | 2, 8, 7 | 7 | 17 | chlorine | non-metal: needs 1 |
| Y | 2, 5 | 5 | 7 | nitrogen | non-metal: needs 3 |
| Z | 1 | 1 | 1 | hydrogen | non-metal: needs 1 (duplet) |
Step 2 — (i) 1. Bond between W and X.
W is a metal and X a non-metal, so W transfers its one valence electron to X. W becomes W+ and X becomes X−, and the two ions attract each other: this is an electrovalent (ionic) bond.
Step 3 — (i) 2. Bond between Y and Z.
Y and Z are both non-metals, so they share electrons. Y needs 3 electrons and each Z needs 1, so Y shares one pair with each of three Z atoms (like ammonia, NH3): this is a covalent bond.
Step 4 — (ii) 1. Formula of the compound of X and Z.
X needs one electron and Z needs one electron, so one X and one Z share a single pair (like hydrogen chloride, HCl). The formula is ZX (written with Z, the hydrogen-like element, first, as in HCl).
Step 5 — (ii) 2. Formula of the compound of W and X.
W loses one electron and X gains one, so the charges +1 and −1 cancel in a 1 : 1 ratio (like NaCl). The formula is WX.

Watch out: Z has only one electron, so it is hydrogen, a non-metal; do not treat it like the metal W just because both have one outer electron.
Therefore, (i) 1. W and X form an electrovalent (ionic) bond, 2. Y and Z form a covalent bond; (ii) 1. X and Z form ZX (or XZ), 2. W and X form WX.