The reaction that is occurring in this question is:
H2 + I2 -> 2 HI
As we can see, the molar ratio for H2 and I2 is 1:1, one mole of H2 for each mole of I2, and the molar ratio between any reactant and HI is 1:2, which means the number of moles of product will be two times more than the number of moles of the reactants
We have:
3.0 moles of H2
2.0 moles of I2
1.0 moles of HI
According to the molar ratio, we should have the name number of moles of I2 and H2, which means that H2 is in excess and I2 is the limiting reactant with 2 moles
If we have 2 moles of I2, and the molar ratio of I2 and HI is 1:2, we should have 4 moles of HI being produced
Therefore the theoretical number of moles is 4.0 moles of HI from 2.0 moles of I2