The correct option is D Both the elements belong to same period
The first shell of any atom can have a maximum number of two electrons. Thus, x is equal to 2.
The electronic configuration of element ‘X’ is 2,23,23–1, i.e. 2, 8, 7. Since it has seven valence electrons, it belongs to group 17. It will gain one electron to complete its octet and therefore, it is a non-metal.
The electronic configuration of element ‘Y’ is 2,23,22–3, i.e. 2, 8, 1. Since it has one valence electron, it belongs to group 1. It will lose one electron to achieve noble gas configuration and therefore, it is a metal.
Both X and Y have three filled shells and thus, belong to period 3 of the periodic table.
Hence, the correct answer is option (d).