The contents of sets x and y really have no role to play in an application of the pairing axiom to x and y.

Ultimately, what you want from pairing is a guarantee of the existence of a unique set that contains exactly x and y as members (nothing else).

How much work you have to do to get it, after application of pairing, depends on the form of the axiom.

The typical strong form will require only an application of extensionality.

The typical weak form will require an additional step prior to applying extensionality.