Inspiring unicorn vs shock
Once person A declares attackers, the Unicorn's ability triggers, and a Shock won't help to stop it. However, if you cast Shock in reaction to the trigger (of course, it's better to cast it before the combat phase), it will resolve before the Unicorn's ability resolves, and will hence kill the Unicorn. I think that person B cast it 'too late' but it's hard to tell; 'before declaring blockers' can be during the remainder of the declare attackers phase.
However, even without the Unicorn around, the ability still resolves, and the other attacking creature will get the +1/+1 bonus. See Does an ability resolve if the source of the ability leaves the battlefield? for more details.