Pierre Gasly had contrasting races in Mexico and the United States as he scored points at the Autodromo Hermanos Rodriguez but failed to finish at the Circuit of the Americas.