Solution:
Concept: First write each reaction to find the product, then draw it. Magnesium chloride is ionic (electron transfer), hydrogen chloride is covalent (sharing), and ammonia in water gives the ammonium ion (coordinate bond). Dots and crosses show which atom each electron came from.
Step 1 — (a) Find the ionic compound.
Magnesium reacts with dilute hydrochloric acid to give magnesium chloride and hydrogen:
Mg+2HCl→MgCl2+H2↑
Step 2 — (a) Draw magnesium chloride.
Magnesium (2, 8, 2) gives one electron to each of two chlorine atoms (2, 8, 7), forming Mg2+ (2, 8) and two Cl− ions (2, 8, 8), each with a stable octet.

Step 3 — (b) Find and draw the covalent compound.
Hydrogen and chlorine combine to form hydrogen chloride:
H2+Cl2→2HCl
In HCl, hydrogen and chlorine share one pair (one electron from each), a polar single covalent bond; chlorine keeps three lone pairs and hydrogen gets a duplet (left part of the figure below).
Step 4 — (c) Find the positive ion.
Ammonia reacts with water; the lone pair on nitrogen accepts a hydrogen ion from a water molecule:
NH3+H2O⇌NH4++OH−
The positive ion is the ammonium ion, NH4+.
Step 5 — (c) Draw the ammonium ion.
Nitrogen donates its lone pair to the hydrogen ion, so the ion has three covalent N–H bonds and one coordinate bond (blue pair), with a single + charge outside the bracket.

Watch out: The positive ion in (c) is NH₄⁺, not H₃O⁺: ammonia takes the H⁺ from water, leaving OH⁻ behind.
Therefore, (a) MgCl₂: Mg²⁺ with two Cl⁻ ions; (b) HCl: one shared pair between H and Cl, three lone pairs on Cl; (c) NH₄⁺: three covalent N–H bonds and one coordinate bond.