NP-Completeness and commutative property
Your property holds for, for example 3-SAT and 3-COLOURABILITY so it's certainly not required that $X=Y$.

The fact that $Y\leq_p X$ and $X\in\mathrm{NP}$ tells you that $Y\in\mathrm{NP}$; the fact that $X$&nbsp;is $\mathrm{NP}$-complete and $X\leq_p Y$ tells you that $Y$&nbsp;is $\mathrm{NP}$-hard.  Therefore, $Y$&nbsp;is $\mathrm{NP}$-complete.