Death's Shadow survives, as do both Goblins. The two Goblins each deal 2 damage (to you and the Shadow, respectively), and Death's Shadow deals 1 damage to the Goblin it was blocking.
The fact it works out this way comes down to some finer details of how we handle combat damage and when creatures die.
The process looks like this:
- We begin the Combat Damage Step (CR 510)
- First, players assign damage equal to the creature's power to the things they're going to hit:
- The Goblin A assigns 2 damage to you.
- The Goblin B assigns 2 damage to Death's Shadow.
- Death's Shadow assigns 1 damage to Goblin B.
- Next, all assigned damage is dealt simultaneously.
- Goblin A's assigned damage is dealt to you: you lose 2 life, setting you at 10 life.
- Goblin B's assigned damage is dealt to Death's Shadow: we mark 2 damage on Death's Shadow.
- Death's Shadow's assigned damage is dealt to Goblin B: We mark 1 damage on Goblin B.
Let's pause here to review what's just happened. We know that in combat damage, creatures deal damage equal to their power simultaneously to each other & players/planeswalkers, but we can see that when we assign damage in step 2, we've basically locked in the amount of damage that's going to be dealt. It doesn't matter if a creature's power changes in step 3, the damage was already assigned based on what its power was in step 2.
We haven't processed deaths in combat yet, so let's continue:
- The active player is about to get priority. We check state based actions first. As part of state based actions, we take a look at whether creatures might die from damage marked on them, and this is the earliest point at which creature deaths might be resolved in combat. Our SBAs find the following:
- Goblin A is a 2/2 with 0 damage marked on it. It survives.
- Goblin B is a 2/2 with 1 damage marked on it. It survives.
- Death's Shadow is calculated as a 3/3 with 2 damage marked on it. It survives.
- The active player gets priority and the game continues.
So to sum up: Death's Shadow is already treated as a 3/3 by the time we finally get to the point of seeing if things will die. We assigned damage, then dealt that damage, then checked the result later, giving your Death's Shadow the capacity to survive.