∙ Metals react with oxygen to form basic oxides, whereas non-metals react with oxygen to form acidic oxides.
Therefore, B is a metal and A is a non-metal.
∙ Acidic oxides react with water to form acids. Basic oxides react with water to form bases.
Therefore, X is an acid because A is a non-metal and Y is a base because B is a metal.