In 'X' pair of compounds, de-localisation of electrons occurs without the change in the relative position of bonded atoms (or nuclei). Hence, X is a resonance pair.
In Y pair of compounds, shifting of proton (H+) occurs from N atom to O atom. Hence, 'Y' is a pair of tautomers.