FR 2540 then FR 2063 at Madrid
Bucharest → Madrid → Palma de Mallorca
Timetable, Madrid time
13:55FR 2540 from Bucharest at the gate
13:45FR 2063 to Palma de Mallorca leaves the gate
23 h 50 apart on the timetable, overnight
FR 2063 leaves 23 h 50 after FR 2540 arrives on the timetable: more than half a day, so not a connection we count.