What is the difference between Mega Charizard X and Mega Charizard Y?
Mega Charizard X loses its Flying Type and gains Dragon Typing, affecting the Same Type Attack Bonus (STAB) of Flying & Dragon moves respectively. It also gets Tough Claws, an ability that increases the strength of physical moves. Its primary boosted stat is Attack
Mega Charizard Y gains the Drought Ability (upping the power of it's fire attacks, and weakening water). Its primary boosted stat is Special Attack. This version of Charizard remains Fire/Flying.
If you have one of each, they should look pretty different in terms of EVs and Movesets. Charizard X would focus more on Physical moves, and drop Flying moves in favour of Dragon ones. Charizard Y would focus on strong Special Attack Fire moves, with Flying for extra coverage.
Against Stealth Rock, Mega Charizard X would be better. They would inflict 50% damage at Mega Charizard Y due to his double weakness to rock type (Fly/Fire), where Mega Charizard X would lost only 25% (only 1 weakness, Fire). You can find more informations about Stealth Rock on this Bulbapedia page.
As said by Robotnik, these 2 mega evolutions don't have the same double type, and their coverage would be totally different :
- Mega Charizard Y could use Solar Beam thanks to his ability Drought which is equivalent of Sunny Day (without a turn used), and always have his immunity to Ground type moves, or any spikes; but Stealth Rock deals a lot of damage, so without any recover, you can't remove your Mega Charizard Y of the battle ground besides seeing him die at the 2nd time he would return on battle
- Mega Charizard X is more physical thanks to his ability Tough Claws (+30% power of physical attacks), he lost his double weakness to Rock moves (and Stealth Rock) due to Dragon type. But after Mega evolution, he would be affected by Ground type moves, and any others spikes, so you must chose correctly when you want to mega evolved him, or you could see him OHKO with a well placed Earthquake (for experience, I was able to do it with a Krokorible Choice Scarf blocked onto Earthquake move).
If you want to build a strategic team on one of this Mega Charizard, think about team which would take advantage of Drought ability of Y form, or huge physical attacks for X form (but don't use this one as Ground counter type).