Answer
The ionic compound formed would have the chemical formula $$Y_2O_3$$
Work Step by Step
The electron configuration of $Y$ is $$[Kr]4d^15s^2$$
The electron configuration of $O$ is $$1s^22s^22p^4$$
Both of these atoms would tend to lose, gain or share electrons so that it could reach an octet, that is to have 8 valence electrons, or in other words, to achieve the configuration of a noble gas.
$O$ atom lacks 2 more electrons to reach an octet $(2s^22p^6)$, while $Y$ atom, if loses 3 valence electrons in subshell $4d$ and $5s$, would achieve the configuration of noble gas $Kr$, with 8 valence electrons (an octet).
Therefore, $Y$ atom is willing to lose 3 valence electrons to the $O$ atom, while $O$ atom is only willing to accept 2 electrons from $Y$. That leaves 1 electron remaining. Adding another $O$ atom does not solve the problem, since $O$ atom needs 2 more electrons for the octet.
However, if there are 2 $Y$ atoms involved that are willing to lose 6 electrons in total, and 3 $O$ atoms involved that are willing to accept 6 electrons in total, then every atom is satisfied.
Eventually, there is 2 $Y$ atoms and 3 $O$ atoms involved in the reaction. That means the ionic compound formed would have the chemical formula $$Y_2O_3$$