Balin's text reads:
Response: Pay 1 resource from Balin's resource pool to cancel a shadow effect just triggered during an attack. Then, deal the attacking enemy another shadow card. (Limit once per attack.)
Just follow the game flow for combat:
1. Deal shadow card face down.
2. Declare defender.
3. Reveal Shadow card and resolve shadow effect.
So the first part of Balin's response is that you can optionally pay 1 resource to cancel a shadow effect that just triggered
. In order for a shadow effect to trigger, it would have to have been revealed, which in the normal course of the enemy attack, would be in step 3 above. This is when you would now be able to play Balin's response.
The 2nd part of Balin's response continues to say that you now need to replace the canceled shadow effect with another shadow card. You can deal this new shadow card face-down if you choose, but because we are now in the step 3 where your defender has already been declared and you reveal the shadow card, you put this new shadow card face up and resolve its shadow effect if any.
And then the rest of the combat phase continues on normally from there.