Let $A$ & $B$ be sets. Prove that $\{A,B\}$ is a set. Here are the axioms that I'm allowed to use.
Axiom of Existence:
There exists a set.
Axiom of Belonging:
If $x$ is an object and $A$ is a set, then $x \in A$ is a proposition.
Axiom of Extension:
Two sets are equal iff they have the same members.
Axiom Schema of Specification:
Let $S$ be a set and let $p(x)$ be an open sentence about the objects in $S$. Then, $\{x \in S: p(x)\}$ is a set.
Axiom of Unions:
Let $F$ be a family of sets. Then, $\cup F$ is a set and it contains all objects that belong to at least one set in the family $F$.
Axiom of Powers:
Let $S$ be a set. There exists a set $P(S)$ whose elements are all the subsets of $S$.
So, all of this is what I'm allowed to prove this result and nothing more. I think this is sufficient context based on the book that I'm using. Now, I will present my argument.

Proof Attempt:
Let $A$ and $B$ be sets. By the Axiom of Unions, $A \cup B$ is a set. By the Axiom of Powers, $P(A \cup B)$ is a set.
Since $A \subset A \cup B$ and $B \subset A \cup B$, it follows that $A \in P(A \cup B)$ and $B \in P(A \cup B)$. We define the following:
$$\phi = \{x \in P(A \cup B): (x = A) \lor (x = B) \}$$
By the Axiom Schema of Specification, $\phi$ is a set. Then, the Axiom of Extension implies that $\phi = \{A,B\}$ and it follows, then, that $\{A,B\}$ is a set. That proves the desired result.
I'm kind of not happy with that first line that uses the Axiom of Unions. It just feels wrong. But perhaps that's just me being stupid about this.
In any case, is the argument above correct? If not, what's wrong with it and how can I fix it?
 A: I suppose that the formulation of the Axiom of Union should be more specific, because otherwise the concept of family might introduce some circularity.

Axiom of Union variant. Let $f(x,y)$ be an open sentence about sets with the property $\forall x\,\exists! y\colon f(x,y)$. Let $I$ be an (index) set. Then there exists a set $\bigcup f(I)$ with
$$ x\in \bigcup f(I)\iff \exists i\in I\colon f(i,x).$$

Now to construct $A\cup B$, we need a suitable $f$ and $I$ to apply this. (Once we have $A\cup B$, we can proceed the way you did). If $I$ is any set with at least two elements and $i_0$ is one of them, we win by letting
$$f(x,y):= (x=i_0\land y=A)\lor (x\ne i_0\land y=B).$$
So now we are left with showing that there exists a set with at lest two elements.
Well, by Existence, there exists some set $X_0$.
By Specification, we find $\emptyset:=\{\,x\in X_0\mid x\ne x\,\}$ which has the property $\forall x\colon x\notin \emptyset$.
Then $X_1:=P(X_0)$ is a set. Clearly (well, the definition of subset is lacking, but ...), $\emptyset\subseteq X_0$ and $X_0\subseteq X_0$, so  $\emptyset,X_0\in P(X_0)$. This shows the existence of a non-empty set $X_1$, but since it may be that $\emptyset=X_0$, we do not have a two-element set yet. However, $X_1$ is non-empty and so $\emptyset$ and $X_1$ are two distinct elements of $X_2:=P(X_1)$. In other words, $X_2$ has at least two elements, as desired.
