FR 5310 then FR 7874 at Madrid
Milan Bergamo → Madrid → Palermo
Timetable, Madrid time
21:45FR 5310 from Milan Bergamo at the gate
13:30FR 7874 to Palermo leaves the gate
15 h 45 apart on the timetable, overnight
FR 7874 leaves 15 h 45 after FR 5310 arrives on the timetable: more than half a day, so not a connection we count.