electronic configuration of bivalent Eu and trivalent Ce are
In ground state europium and cerium have following configuration
Eu(63)-(Xe)4f^76s^2
Ce (58)-( Xe)4f^15d^16s^2
Bivalent means loss of 2 electron
And trivalent means loss of 3 electron
Eu^2+ = Xe 4f^7
Ce^3+ = Xe4f^1
Xe= xenon
Hope this will help
Thank you