reasons are as followed,
covalent bond is formed when elements share their electrons in their outermost electron shell
ionic bond is formed when metals donate their outermost electron and non-metals accept the electrons from metal. the attraction between positively charged metal ions and negativily charged non-metal ions is ionic bond.
Thus, ionic bond is generally formed when a metal reacts with a non-metal, like choice B.
Covalent bond is generally formed when one or more atoms of non-metals react, like choice A C and D