Solution:
Concept: When an alkali is added to a salt solution, its hydroxide ions (OH−) join the metal ions and form the metal hydroxide. Most metal hydroxides are insoluble in water, so they appear as a precipitate. The colour of the precipitate, and whether it dissolves when more alkali is added, tell us which metal ion is present. Zinc hydroxide dissolves in excess of both alkalis; lead hydroxide dissolves in excess NaOH but not in excess NH4OH; calcium gives no precipitate with NH4OH and a white one with NaOH that stays.
Step 1 — (a) White precipitate with NH₄OH, insoluble in excess.
Zinc hydroxide would dissolve in excess NH4OH, and calcium would give no precipitate at all. Lead hydroxide is chalky white and stays in excess NH4OH, so solution B contains the lead ion:
Pb2++2OH−→Pb(OH)2↓

Step 2 — (b) White precipitate with NaOH, insoluble in excess.
Zinc and lead hydroxides would both dissolve in excess NaOH. Calcium hydroxide is white and only sparingly soluble, so it stays; solution C contains the calcium ion:
Ca2++2OH−→Ca(OH)2↓

Watch out: Lead appears in (a) but NOT in (b): its precipitate stays in excess NH₄OH but dissolves in excess NaOH.
Note: these are the expected answers from the ions in the ICSE tables. Outside those tables, Al³⁺ also gives a white precipitate that stays in excess NH₄OH, and Mg²⁺ a white precipitate that stays in excess NaOH.
Therefore, (a) the cation in B is Pb²⁺ (lead ion); (b) the cation in C is Ca²⁺ (calcium ion).