Your teacher was right.
The reaction you describe is #H_2 + I_2 --> 2HI#. The enthalpy change of formation of hydrogen iodide ( from its elements, under standard conditions) is +26.5 kJ/mol. This means on your energy diagram the products (2HI) should be 53kJ/mol higher than the reactants as this reaction is endothermic.
I am not sure why you say "h2 and i are forming"... The molecule HI is forming, out of hydrogen molecules and iodine molecules.
There is no simple way to look at this reaction and say whether it will be exothermic or endothermic, because first you have to break the bonds between the hydrogen atoms in the #H_2# molecules and between the iodine atom in the #I_2# molecules (this requires energy, an endothermic step) then the bonds between the hydrogen and iodine atoms can be formed (bond making releases energy, an exothermic step). it is the balance of these two that determines whether the reaction is exothermic or endothermic overall. The published value shows that it is actually endothermic, so it takes more energy to break the bonds in the reactants than is released when the bonds in the products are formed.