The formula of the compound is XY. This means that the relation between the moles is 1: 1. One mole of X per one mole of Y.
From the information about the element X you can determine the number of moles of X (which is the same that the number of moles of Y).
# of moles of X = weigth of X / atomic mass of X = 17.15 g / 22.9 g/mol = 0.74598
Now the atomic mass of Y = weight of Y / # of moles of Y = 14.17 g / 0.74598 mol = 19 amu