Be(OH)2 is amphoteric and the basic strength increases down the group.
Due to small size and high ionisation enthalpy of Be,Be(OH)2 is amphoteric.
Therefore, it dissolves both in acid and bases. Be(OH)2+2HCl+2H2O→[Be(H2O)4]Cl2 Be(OH)2+NaOH→Na2BeO2+2H2O
or Na2[Be(OH)4] or Be(OH)2+2OH⊖→[Be(OH)4]2−
Hence, both reaction are feasible.