FR 189 then W9 5372 at Madrid
Edinburgh → Madrid → London Luton
Timetable, Madrid time
13:55FR 189 from Edinburgh at the gate
12:40W9 5372 to London Luton leaves the gate
22 h 45 apart on the timetable, overnight
W9 5372 leaves 22 h 45 after FR 189 arrives on the timetable: more than half a day, so not a connection we count.