Electronic configuration of element B (atomic number =19) is 2,8,8,1. It has one electron in its outermost shell so it loses that electron to maintain its stability. Therefore, B is a metal.
Additional information:
Metals are defined as the elements which form positive ions by the loss of electrons. Potassium (atomic number =19) has 1 electron in its outermost shell, so it loses one electron to complete its octet.