3 and 6 electrons are present in outer-most orbit of A and B respectively. The chemical formula of its compound will be
For this let's look at the valence electrons i.e. electrons in outer-most orbit of A and B, which are given respectively as 3 and 6.
The element A prefers to donate 3 electrons to attain stability rather than gaining 5 electrons. Similarly element B prefers to gain 2 electrons to attain octet configuration rather than losing electrons.
Hence the valencies of A and B respectively are 3 and 2.
The chemical formula of the compound would be A2B3 as 2A atoms can donate 6 electrons to 3B atoms, thereby satisfying both the elements.