When should I add cocoa powder to instant coffee?
If you're using plain cocoa powder, which doesn't really dissolve, I would mix it with the coffee powder before adding to the water, and as long as the coffee powder will tolerate it, add it all to the water before heating. Mixing the two powders should help avoid clumps in the cocoa powder, and adding it early will give it time to release flavor into the water. You'll still have to stir a bit to keep it from settling out, though!

If you're using instant cocoa mix, which is sweetened and processed to make it dissolve evenly, you can just add it at the end. There's no benefit from adding it earlier, and it'll be easiest to stir and dissolve it in already hot water.