During formation of H2 molecule two hydrogen atoms approach each other
in general
a) opposite charges attract each other
b) similar charges repel each other
c) electrons are negatively charged
d) nucleus is positively charged due to presence of protons
thus we can say that
When two hydrogen atoms approach each other
a) the two nuclei (positively charged) repel each other
b) each electron (negatively charged) is attracted by other nucleus.