The only way to own all three of the Pokemon X & Y Legendaries is to trade for it because each version will only come with two of the three but there is how you can catch the Legendary Pokemon in the version you have.
To catch Xerneas, you will need to play the Pokemon X version. The only time you can catch the Legendary Pokemon is at the Team Flare’s lab. To make sure you don’t miss out, save the game beforehand. If yo own the Pokemon Y version, you will be able to capture Yvetal.
Zygarde can be found in Terminus Cave in both the version. Make your way to the end and you will find the Legendary Pokemon. As for MewTwo, you will need to go to the Unkown Cave near the Pokemon Village after beating the Elite Four.
Besides those legendary, Pokemon trainers can also capture the Legendary bird, Zapdos, Articuno and Moltres in Pokemon X and Y. The bird you meet will depend on which starting Pokemon you’ve chosen in the beginning. Zapdos will appear if you pick Fennekin, Articuno will appear if you pick Chespin while Moltres will appear if you pick Froakie as your first Pokemon.
To find them, you will need to use your Pokedex and track them down. After escaping for 10 times, you will be able to battle it at Sea Spirit’s Den.