Definition of subgame perfect Nash equilibrium
An equilibrium consists of a profile of strategies, which specifies an action for every player at each possible contingency. Since each action profile $(a_1,a_2)$ is a contingency, the SPE must include functions $a^*_3(a_1,a_2), a^*_4(a_1,a_2)$ that specifies what to do at those contingencies.