FR 5322 then FR 9602 at Madrid
Milan → Madrid → Rome
Timetable, Madrid time
12:45FR 5322 from Milan at the gate
06:00FR 9602 to Rome leaves the gate
17 h 15 apart on the timetable, overnight
FR 9602 leaves 17 h 15 after FR 5322 arrives on the timetable: more than half a day, so not a connection we count.