FR 5316 then AM 39 at Madrid
Rome → Madrid → Guadalajara
Timetable, Madrid time
16:05FR 5316 from Rome at the gate
13:30AM 39 to Guadalajara leaves the gate
21 h 25 apart on the timetable, overnight
AM 39 leaves 21 h 25 after FR 5316 arrives on the timetable: more than half a day, so not a connection we count.