Your wording, "we have both $X$ and $Y$ forms a bijection with itself", is poor. The sentence makes no sense, and I am not sure what it was you were trying to say...
There are two different ways to define "an action of a group $G$ on a set $X$"; they turn out to be essentially equivalent:
We say a group $G$ acts on a set $X$ if we have a function $\cdot\colon G\times X\to X$ (with $\cdot(g,x)$ usually denoted $g\cdot x$ or simply $gx$) such that:
- $ex = x $ for all $x\in X$: and
- $g(hx) = (gh)x$ for all $x\in X$, $g,h\in G$.
We say a group $G$ acts on a set $X$ if there exists a group homomorphism $\varphi\colon G\to S_X$, where $S_X$ is the permutation group on $X$.
The two definitions are equivalent, because given an action in the second sense, we can define a homomorphism by letting $\varphi(g)(x) = gx$; and given a homomorphism $\varphi\colon G\to S_X$, we can define an action as in the first sense by letting $g\cdot x= \varphi(g)(x)$.
Using the first definition, we have a way in which $G$ acts on $X$, and it satisfies We know that $ex=x$ and $g(hx) = (gh)x$ for all $x\in X$ and $g,h\in G$. And we also have an action on $Y$ that satisfies $ey = y$ and $g(hy) = (gh)y$ for all $g,h\in G$, $y\in Y$.
To verify the defined function is an action on $X\times Y$, let $e$ be the identity and let $(x,y)\in X\times Y$. Then $\begin{align*} e(x,y) &= (ex,ey) &&\text{(by definition of the action)}\\ &= (x,y) &&\text{(since }G\text{ acts on }X\text{ and on }Y\text{)}. \end{align*}$ And if $(x,y)\in X\times Y$ and $g,h\in G$, then $\begin{align*} g(h(x,y)) &= g(hx,hy) &&\text{(by definition of the action)}\\ &= \Bigl(g(hx),g(hy)\Bigr) &&\text{(by definition of the action)}\\ &= \Bigl( (gh)x, (gh)y\Bigr) &&\text{(since }G\text{ acts on }X\text{ and on }Y\text{)}\\ &= (gh)\Bigl(x,y\Bigr) &&\text{(by definition of the action)} \end{align*}$ So $G$ acts on $X\times Y$ under the given definition.
To use the second definition, note that there is a natural homomorphism $S_X\times S_Y$ to $S_{X\times Y}$: given $(\sigma,\tau)\in S_X\times S_Y$, we let $(\sigma,\tau)(x,y) = (\sigma(x),\tau(y))$. Verifying that this is an element of $S_{X\times Y}$ follows by noting that $(\sigma^{-1},\tau^{-1})$ is a two-sided inverse. Verifying that this map is a group homomorphism amounts to the same verification as done above for the second property of an action. So we have $\varphi\colon G\to S_X$, and $\psi\colon G\to S_Y$. These two maps automatically give us a homomorphism $\varphi\times\psi\colon G\to S_X\times S_Y$, and composing with the embedding $S_X\times S_Y\hookrightarrow S_{X\times Y}$ we get a homomorphism $G\to S_{X\times Y}$; if you trace the functions, you will find the action this homomorphism defines is precisely $g(x,y) = (gx,gy)$.