I'm trying to understand the proof of the recursion principle of ordinals, the theorem is:

The proof of this theorem uses this other theorem:

The proof is pretty long (I'm sorry) so I will try to highlight the main steps and you can only read the green parts:

The part I don't understand is the part highlighted in red, shouldn't this proof show that $A=\mathscr{O}$. Could you guys please explain me how the result of this theorem follows from the transinite induction principle? Thank you!
$\delta$ in the proof is arbitrary ordinal, so we have shown that $\delta$-function exists for any ordinal $\delta$. By the lemma in the proof, we can merge all $\delta$-function into a single one, and it gives a class function we desired.
Your Theorem 8.9 also states that we can define not only a function over the class of all ordinals but also a function of the domain $\delta$ recursively. This is the reason why the proof flows in this way.