The easiest way to separate cations is through solubility. If one of the cations precipitates out of solution while the other stays in the solution you basically separated them since then you can filter out the precipitate.
For part a I would separate the cations through the addition of a halide salt such as NaBr or KCl to get the Pb²⁺ to precipitate out leaving only the Ca²⁺ in solution.
This is using the rule where halides are usually soluble unless with Ag⁺, Pb²⁺, or Hg₂²⁺
for part b I would add sulfate anions through a sulfate salt such as Na₂SO₄ to precipitate our the Ba²⁺ leaving only the Mg²⁺ in solution.
This is using the rule where sulfate is soluble unless with Ba²⁺, Pb²⁺, Ca²⁺, or Sr²⁺.
I hope this helps. Let me know if anything is unclear or if you want me to explain anything further.