Phase transformations of the H/W(110) and H/Mo(110) surfaces