You have $x,y$, let us construct the pair $\{x,y\}$.
First note that $\varnothing=\{z\in x\mid z\neq z\}$. So we have the empty set. Now by the power set axiom we have $P(\varnothing)=\{\varnothing\}$ and $P(P(\varnothing))=\{\varnothing,\{\varnothing\}\}$.
Now let us define a formula (with parameters $x,y$):
$$\varphi(u,v,x,y)\colon= (u=\varnothing\land v=x)\lor(u=\{\varnothing\}\land v=y\})$$
(Note that $\{\varnothing\}$ can be defined explicitly as the set that all its elements are the empty sets)
Using replacement now, we set the parameters $x,y$ now the axiom says that $\{u\mid\exists v\in P(P(\varnothing))\colon\varphi(v,u,x,y)\}$ exists. But this set is exactly $\{x,y\}$.
You cannot use the axiom of union to prove from the existence of $\{x\}$ and $\{y\}$ the existence of the set $\{x,y\}$. The axiom of union says that if $A$ is a set then $\bigcup A$ is a set. However you want to say that $\{\{x\},\{y\}\}$ is a set therefore its union, which is $\{x,y\}$ is a set. You already assume the existence of a pair.
You can indeed use separation to prove the existence of $\{x\}$ using the power set axiom as well.
To use a power set, or separation argument you have already the existence of some set. Note that the power set axiom says that if $x$ is a set then there exists a set which contains all the subsets of $x$. Separation is the same, you assume the existence of a set. If you wish to use these two, adding an assumption that an empty set exists is meaningless (note that empty sets exists due to separation, so using it for $\{x\}$ is the same as using it for $\varnothing$).
You can see in Stanford Encyclopedia of Philosophy the entry on Set Theory .
The Supplement listing the axioms of Zermelo-Fraenkel Set Theory has :
The final axiom of $\mathsf {ZF}$ is the Replacement Schema. Suppose that $\phi(x,y,û)$ is a formula with $x$ and $y$ free, and let $û$ represent the variables $u_1,…,u_k$, which may or may not be free in $\phi$. Furthermore, let $\phi_{x,y,û}[s,r,û]$ be the result of substituting $s$ and $r$ for $x$ and $y$, respectively, in $\phi(x,y,û)$. Then every instance of the following schema is an axiom:
Replacement Schema:
$\forall u_1 …\forall u_k [\forall x \exists !y \phi(x,y,û) \rightarrow \forall w \exists v \forall r (r \in v \equiv \exists s(s \in w \land \phi_{x,y,û}[s,r,û]))]$
In other words, if we know that $\phi$ is a functional formula (which relates each set $x$ to a unique set $y$), then if we are given a set $w$, we can form a new set $v$ as follows: collect all of the sets to which the members of $w$ are uniquely related by $\phi$.
Note that the Replacement Schema can take you ‘out of’ the set $w$ when forming the set $v$. The elements of $v$ need not be elements of $w$. By contrast, the well-known Separation Schema of Zermelo yields new sets consisting only of those elements of a given set $w$ which satisfy a certain condition $\psi$. That is, suppose that $\psi(x,û)$ has $x$ free and may or may not have $u_1, …,u_k$ free. And let $\psi_{x,û}[r,û]$ be the result of substituting $r$ for $x$ in $\psi(x,û)$. Then the Separation Schema asserts:
Separation Schema:
$\forall u_1 …\forall u_k[\forall w \exists v \forall r(r \in v \equiv r \in w \land \psi_{x,û}[r,û])]$
In other words, if given a formula $\psi$ and a set $w$, there exists a set $v$ which has as members precisely the members of $w$ which satisfy the formula $\psi$.
A formal proof of the relation between the two is in Gaisi Takeuti & Wilson Zaring, Introduction to Axiomatic set theory (1971), page 17 (we omit the initial string of $\forall$s) :
Axiom Schema of Replacement
$\forall a [\forall u \forall v \forall w [\phi(u, v) \land \phi(u, w) \rightarrow v = w] \rightarrow \exists b \forall x [x \in b \equiv \exists u [u \in a \land \phi(u, x)]]]$.
Note. The condition of functionality for $\phi$ has been unwinded.
Note also that $a$ is not mentioned in the antecedent, so you can rewrite the formula as : $\forall u \forall v \forall w [...] \rightarrow \forall a\exists b \forall x [x \in b \equiv \exists u [u \in a \land \phi(u, x)]]$. In this way, the consequent has clearly the "form" of Separation.
Zermelo's Schema of Separation
$ \forall a \exists b \forall x [x \in b \equiv x \in a \land \phi(x)]$.
Applying Replacement to the wff $\phi(u) \land u = v$ where $v$ does not occur in $\phi(u)$ we have that $[\phi(u) \land u=v] \land [\phi(u) \land u=w] \rightarrow v = w$.
Note. After an "instantiation" of the Replacement schema, the universal closure of the above formula give us its antecedent ; so we can "detach" the consequent.
Therefore
$\exists b \forall x [x \in b \equiv \exists u [\phi(u) \land u = x \land x \in a]]$
i.e. [Note: here we have several steps in one; we need the equality axiom $\vdash u = x \rightarrow (\phi(u) \rightarrow \phi(x))$, "rearranged" as $\vdash (\phi(u) \land u = x ) \rightarrow \phi(x)$ and a final application of quantifier rules to get : $\vdash \exists u(\phi(u) \land u = x ) \rightarrow \phi(x)$.]
$\exists b \forall x [x \in b \equiv \phi(x) \land x \in a]$.
Note. The final step is to introduce the universal quantifier $\forall a$, by "generalization".
Best Answer
The replacement axiom (axiom scheme) is the most general form you need, essentially saying that if you have a function whose domain is a set then the image is also a set. Furthermore, the empty set can be inferred by an existence of any set at all, when combined with separation (and hence, can be inferred by replacement).
Formally speaking the replacement schema says that for every formula $\varphi(u,v,p_1,\ldots,p_n)$, fix the parameters $p_1,\ldots,p_n$ and pick any set $A$, whenever $u\in A$ has at most one $v$ for which $\varphi(u,v,p_1,\ldots,p_n)$ is true, then the collection of $\{v\mid\varphi(u,v,p_1,\ldots,p_n), u\in A\}$ is also a set.
How to infer separation and pairing? Simple.
First we infer separation. Given $\phi(x)$, we simply define $\varphi(u,v,p)$ to be $$\varphi(u,v,p)\stackrel{\text{def}}{=} u=v\land u\in p\land\phi(u)$$ This is a functional formula (i.e. for every $u$ there is at most a single $v$ for which $\varphi(u,v,p)$ holds) and it is easy to verify that the image of $\varphi(u,v,a)$ is indeed $\{x\in a\mid \phi(x)\}$.
The empty set exists by separation - simply take some $a$ (which exists because we assume there is some set in the universe) and the function $\phi(x)\colon = x\neq x$.
As you noted, $\{\emptyset ,P(\emptyset)\}$ exists by the Power set axiom.
Now for a given $x,y$ we want to have $\{x,y\}$ so we define the following $\varphi(u,v)$ as following: $$\varphi(u,v) \colon = (u=\emptyset\wedge v=x)\vee (u=P(\emptyset)\wedge v=y)$$
Note that $\varphi$ is a functional formula, i.e. for a given $u$ there is only one $v$ for which $\varphi(u,v)$ is true. By the axiom of replacement we have now that $\{x,y\}$ is a set. Therefore the axiom of pairing holds if we assume Power set and Replacement.
Now we have two ways of looking at ZFC. Sometimes we want to prove that something is a model for ZFC and need to verify the list of axioms in which case proving both Separation and Replacement is completely redundant. At other times we want to prove certain things which are quicker when using the more specific axioms (e.g. pairing (or even ordered pairing, which can be quickly inferred from pairing itself)).
This is a sort of freedom that we allow ourselves. We add extra axioms that we don't really need. Then if we want to ensure all the axioms hold we check for the "core" of the axiomatic system, and when we want to ease on ourselves in other cases we can just use the extra axioms for our convenience.