Ionic bonds are formed between atoms donating and accepting electron/s. In simpler terms, an eletropositive atom will donate electrons to achieve eletroneutrality (or noble gas configuration), while an electronegative atom will receive these electrons to reach the stable noble gas configuration. Calcium has two valence electrons and readily loses them to form a cation, Ca(II) or `Ca^(2+)` . It will form ionic bonds with an atom that needs two more electrons or one more electron. Among the options, it can form ionic bonds with Y and Z. Y needs 2 more electrons to achieve fully filled electron shells and we can get CaY (think CaO, calcium oxide). Z needs 1 more electron and 2 atoms of Z can get the 2 electrons donated by Ca and give an ionic compound of the form CaZ2 (think CaCl2, calcium chloride).
Hope this helps