First: don't connect cabling before port trunking (link aggregations, on both peers: the IRF and the 3rd Switch involved) are configured...that's to avoid loops.
Then: configure LAG both on IRF and on your 3rd involved Switch; on IRF the LAG configuration is the same you apply on your 3rd Switch (considering you're dealing with all Comware operating system based units...LAG on ProCurve/ArubaOS-Switch operating system based units has configuration CLI commands slightly different)...just the port numbering is different since you are dealing with 2 Switches in a IRF domain.
Once done connect one cable at time (IRF Member 1 Interface 1 to 3rd Switch Interface 1, IRF Member 2 Interface 1 to 3rd Switch Interface 2)...using the interfaces numbers you really have planned to use.