The electronic configuration of two atoms X and Y are as follows: X – 1s…