(a) Y and Z will form an ionic compound because an ionic bond is formed when one of the atoms can donate electrons to achieve the inert gas configuration, and the other atom needs electrons to achieve the inert gas configuration. Since Y has 7 and Z has 1 electron in their outermost shell, they would form an ionic bond.
(b) X and Y will react to form a covalent compound because a covalent bond is formed when both the reacting atoms need electrons to achieve the inert gas electron arrangement