Well, don't worry about the miles, directly, on a Challenge - because what you need is Elite-Qualifying
Points. You earn 1.5 points per Elite-Qualifying Mile (basically, mile flown - bonus miles do not count in this kind of math) in Business or First, or even B or Y (full Y, not merely coach) and anywhere from 1.0 to 0.5 points per mile flown on other fares.
For Gold you need 5,000 Points within three months' time. So,
CCS-MIA and MIA-MEX = 2635 EQ Miles x 1.5 = 3952 Points
MEX-MIA-CCS = 2635 EQ Miles, and since we do not know which economy fare, we have no idea - it could be anywhere from 3952 for Y or B, to 1317 points for the most highly discounted fares (G, Q**, N, O**, S) - except that O class between the US and Latin America would not earn miles or points.
aa.com: ** Tickets between North America and Europe, India, Asia and Latin America booked in O and Transatlantic tickets booked in Q are not eligible.
So, it is
most likely that you would be able to complete a Gold Challenge with your CCS-MIA-MEX return flights, but we can not say for sure because we do not know what fare class your return is in.
aa.com Miles / Points discussed in Elite Qualifications <
link>
aa.com miles earned on different fare classes <
link>
We also know form the last link you will learn 25% bonus miles in Business (I, D or J fare classes,) but those are redeemable miles, not Elite Qualifying Miles counted for status (or for calculating E Q Points.)
It may seem quite complex right now; all of us probably began feeling that way, learned how the system works and document it here on FlyerTalk for others. We have a welcome announcement at the head of this Forum, and a "sticky" thread entitled
Unofficial Users' Guide that has some orientation, links and guide to tools for frequent flyers.