FR 2540 then AV 6518 at Madrid
Bucharest → Madrid → Frankfurt am Main
Timetable, Madrid time
13:55FR 2540 from Bucharest at the gate
13:20AV 6518 to Frankfurt am Main leaves the gate
23 h 25 apart on the timetable, overnight
AV 6518 leaves 23 h 25 after FR 2540 arrives on the timetable: more than half a day, so not a connection we count.