FR 5712 then AD 6908 at Madrid
Budapest → Madrid → Rome
Timetable, Madrid time
20:05FR 5712 from Budapest at the gate
12:40AD 6908 to Rome leaves the gate
16 h 35 apart on the timetable, overnight
AD 6908 leaves 16 h 35 after FR 5712 arrives on the timetable: more than half a day, so not a connection we count.