W4 3173 then FR 5997 at Madrid
Bucharest → Madrid → London Stansted
Timetable, Madrid time
17:50W4 3173 from Bucharest at the gate
17:40FR 5997 to London Stansted leaves the gate
23 h 50 apart on the timetable, overnight
FR 5997 leaves 23 h 50 after W4 3173 arrives on the timetable: more than half a day, so not a connection we count.