Two large earthquakes struck western Mexico, shaking buildings as far away as the capital and sending people rushing out of offices onto the streets, the U.S. Geological Survey said.