EC 7639 then W6 2498 at Madrid
Lisbon → Madrid → Budapest
Timetable, Madrid time
08:20EC 7639 from Lisbon at the gate
21:15W6 2498 to Budapest leaves the gate
12 h 55 apart on the timetable
W6 2498 leaves 12 h 55 after EC 7639 arrives on the timetable: more than half a day, so not a connection we count.