FR 5712 then IB 1145 at Madrid
Budapest → Madrid → Lisbon
Timetable, Madrid time
20:05FR 5712 from Budapest at the gate
19:40IB 1145 to Lisbon leaves the gatealso LA 1670, VY 5748
23 h 35 apart on the timetable, overnight
IB 1145 leaves 23 h 35 after FR 5712 arrives on the timetable: more than half a day, so not a connection we count.