Concept:
The electronic configuration of an ion is determined by starting with the ground-state configuration of the neutral atom and removing electrons. Electrons are always removed first from the orbital with the highest principal quantum number (n).
1. Cerium (Ce⁴⁺)
Ce = [Xe] 4f¹ 5d¹ 6s²
Ce⁴⁺ = [Xe] or [Kr] 4d¹⁰ 5s² 5p⁶
As a result, Ce⁴⁺ achieves a stable noble gas configuration (Xenon).
2. Cobalt (Co²⁺)
Co = [Ar] 3d⁷ 4s²
Co²⁺ = [Ar] 3d⁷