You are on the right track but you're missing a step! You know that the energy needs to break the bonds on the left hand side of the equation is 3340 kJ + C-I and you know that the energy released from forming the bonds on the right hand side of the equation is 3532 kJ. However, you also know that the net energy change for the reaction has to be +38 kJ from the enthalpy of reaction. Therefore:
38 = 3340 + C-I - 3532