The statement $A = B \rightarrow \forall \; O \quad ; A^O = B^O$ is incorrect. For example, it is known that $\mathrm{IP} = \mathrm{PSPACE}$, but we know that there exists an oracle $A$ such that $\mathrm{IP}^A \ne \mathrm{PSPACE}^A$.
Direct substituion does not work here, because different characterisations of one particular class can behave different when we relativize them.

