Is Mexico the capital of Mexico City?

No, Mexico is not the capital of Mexico City.

Mexico City is the capital of Mexico.
No, Mexico is not the capital of Mexico City.

Mexico City is the capital of Mexico.