Soln:
Metal A is Aluminium and B is Al2O3
With HCl
Al2O3+ 6HCl 2AlCl3+3H2O
With NaOH
Al2O3+2NaOH 2NaAlO2+H2O