IB 2297 then IB 1137 at Madrid
Melilla → Madrid → Santiago de Compostela
Timetable, Madrid time
20:55IB 2297 from Melilla at the gatealso QR 5377, VY 5697
19:40IB 1137 to Santiago de Compostela leaves the gatealso LA 1841, AY 5605, VY 5735, AV 6122, BA 7216, PC 7737
22 h 45 apart on the timetable, overnight
IB 1137 leaves 22 h 45 after IB 2297 arrives on the timetable: more than half a day, so not a connection we count.