(a) pH paper carries universal indicator, whose colour shows where a solution lies on the pH scale.
Solution 'X' (light blue) is basic. Its pH is more than 7, roughly 8 to 10, so it is a weak alkali.
Solution 'Y' (orange) is acidic. Its pH is less than 7, roughly 3 to 5.
(b) 'A' is the metal. A metal burns in air to form a metal oxide, which is left behind as ash. Metal oxides are basic, so when the ash dissolves in water it gives a basic solution, which is what 'X' is. For example, magnesium:
2Mg(s)+O2(g)→2MgO(s)
MgO(s)+H2O(l)→Mg(OH)2(aq)
A non-metal such as sulphur burns to give a gaseous oxide, which comes off as fumes. Non-metal oxides are acidic, so the fumes dissolve in water to give an acidic solution like 'Y':
S(s)+O2(g)→SO2(g)
SO2(g)+H2O(l)→H2SO3(aq)
So 'B' is a non-metal.

The pH scale in colour, with the indicator ranges and where familiar substances sit.