1) The atomic number of element is 20. Its electronic configuration is 2,8,8,2. So , it has a valency of 2.
2) It is a metal and it can lose its valence electrons to obtain noble gas electronic configuration.
3) The element Y has an atomic number of 8. Hence , the valency of Y is also 2. The compound formed will be XY.