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