2W 2502 then FR 404 at Madrid
Cancún → Madrid → Palma de Mallorca
Timetable, Madrid time
12:352W 2502 from Cancún at the gate
11:05FR 404 to Palma de Mallorca leaves the gate
22 h 30 apart on the timetable, overnight
FR 404 leaves 22 h 30 after 2W 2502 arrives on the timetable: more than half a day, so not a connection we count.