6s2 + 40s - 60 = 2(3s2 + 20s - 30)
(6s+ 5)(s - 1)
It's not barium. [Xe] 6s2 is barium. But [Xe] 6s2 4f14 5d10 (or 4f14 5d10 6s2 - it doesn't matter which way round) is Hg (mercury).
Ce, Cerium is Xe 6s2 5d1 4f1.
[Xe] Normally the electronic configuration for Barium would be [Xe] 6s2, but since you want it for Ba2+, you're missing two electrons. You get rid of the 6s2 and get [Xe].
Electron_configuration[Xenon] 6s2 4f14 5d10 6p4Electron_configuration[Xenon] 6s2 4f14 5d10 6p4
The GCF is s.