FR 5712 then I2 1743 at Madrid
Budapest → Madrid → Málaga
Timetable, Madrid time
09:05FR 5712 from Budapest at the gate
22:35I2 1743 to Málaga leaves the gatealso IB 1743
13 h 30 apart on the timetable
I2 1743 leaves 13 h 30 after FR 5712 arrives on the timetable: more than half a day, so not a connection we count.