Solution:
Concept: Calcium, zinc and lead ions all give white precipitates with NaOH, but only calcium's stays in excess (zinc and lead hydroxides are amphoteric). Only copper gives an inky blue solution with excess ammonium hydroxide.
Step 1 — (a) The metal ion in solution A.
The white precipitate does not dissolve in excess sodium hydroxide, so it is not zinc or lead hydroxide. It is calcium hydroxide, and the metal ion is the calcium ion, Ca2+:
Ca(NO3)2+2NaOH→Ca(OH)2↓+2NaNO3
Step 2 — (b) The cation in solution B: the pale blue precipitate.
A pale blue precipitate with ammonium hydroxide is copper (II) hydroxide:
CuSO4+2NH4OH→Cu(OH)2↓+(NH4)2SO4
Step 3 — (b) The inky blue solution.
In excess ammonium hydroxide the precipitate dissolves to form inky blue tetraamminecopper (II) sulphate, which confirms the copper (II) ion, Cu2+:
Cu(OH)2+(NH4)2SO4+2NH4OH→[Cu(NH3)4]SO4+4H2O

Watch out: Excess NaOH is the step that separates calcium from zinc and lead; a white precipitate alone could be any of the three.
Therefore, (a) the metal ion in A is calcium, Ca²⁺; (b) the cation in B is copper (II), Cu²⁺.