Consider the following formula that is to transformed into prenex normal form: $$(\exists x_1. p(x_1)) \lor (\forall x_2. q(x_2)).$$
When consulting the rules for transformations of quantors (e.g., from enter link description here), the one option would be the following steps $$\exists x_1. (p(x_1)) \lor \forall x_2. q(x_2))$$ $$\exists x_1. ( \forall x_2.(p(x_1) \lor q(x_2))).$$
But another option would be a different order of applying the same rules $$ \forall x_2.((\exists x_1.p(x_1)) \lor q(x_2)))$$ $$ \forall x_2.(\exists x_1.(p(x_1) \lor q(x_2))),$$ which is different formula (this could also have been obtained, by using commutative of $\lor$ in the first formulat).
What is the implicit convention, that tells which order of rules has to be used? And, as a consequence, which of these two options is correct?