Answer
The ionic compound formed would have the chemical formula $$Al_2O_3$$
Work Step by Step
The electron configuration of aluminum ($Al$) is $$[Ne]3s^23p^1$$
The electron configuration of oxygen ($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 $Al$ atom, if loses 3 valence electrons in subshell $3s$ and $3p$ , would achieve the configuration of noble gas $Ne$, with 8 valence electrons (an octet).
Therefore, $Al$ atom is willing to lose 3 valence electrons to $O$ atom, but $O$ atom only takes 2 electrons to achieve an octet. Losing only 2 electrons is not enough for $Al$ atom to achieve an octet, so it is not done here.
If in the reaction, there are 2 $Al$ atoms willing to lose 6 electrons in total and there are 3 $O$ atoms willing to accept 6 electrons in total, then the problem can be solved, and all can achieve an octet.
That means there are 2 $Al$ atoms and 3 $O$ atoms involved in the reaction. The ionic compound formed, as a result, would have the chemical formula $$Al_2O_3$$