FR 6712 then IB 809 at Madrid
Budapest → Madrid → Prague
Timetable, Madrid time
18:10FR 6712 from Budapest at the gate
12:00IB 809 to Prague leaves the gatealso AA 8706
17 h 50 apart on the timetable, overnight
IB 809 leaves 17 h 50 after FR 6712 arrives on the timetable: more than half a day, so not a connection we count.