U2 8734 then U2 804 at Gatwick
Budapest → London → Edinburgh
Timetable, London time
22:30U2 8734 from Budapest at the gate
16:00U2 804 to Edinburgh leaves the gate
17 h 30 apart on the timetable, overnight
U2 804 leaves 17 h 30 after U2 8734 arrives on the timetable: more than half a day, so not a connection we count.