AA 8762 then QR 6963 at Madrid
Valencia → Madrid → Santiago de Compostela
Timetable, Madrid time
07:10AA 8762 from Valencia at the gate
19:40QR 6963 to Santiago de Compostela leaves the gate
12 h 30 apart on the timetable
QR 6963 leaves 12 h 30 after AA 8762 arrives on the timetable: more than half a day, so not a connection we count.