W6 2391 then FR 5493 at Madrid
Budapest → Madrid → Milan Bergamo
Timetable, Madrid time
08:45W6 2391 from Budapest at the gate
22:30FR 5493 to Milan Bergamo leaves the gate
13 h 45 apart on the timetable
FR 5493 leaves 13 h 45 after W6 2391 arrives on the timetable: more than half a day, so not a connection we count.