FR 2767 then FR 9674 at Madrid
Prague → Madrid → Rome
Timetable, Madrid time
17:45FR 2767 from Prague at the gate
10:25FR 9674 to Rome leaves the gate
16 h 40 apart on the timetable, overnight
FR 9674 leaves 16 h 40 after FR 2767 arrives on the timetable: more than half a day, so not a connection we count.