On the theory of the interactions and phase transitions of hydrogen in the transition metals