I have to disagree with the answer for this one ...
c) the spare ball strikes the live ball on its way to the goal after the Yellow attacker has shot?
Answer b: If this prevented an obvious goal from being scored, play should be stopped, the Red No.5 should be sent off for denying a goal, and play restarted with a dropped ball in the position where the match ball was contacted.
The Law clearly states:
denying an obvious goal scoring opportunity to an opponent moving towards the player's goal by an offence punishable by a free kick or a penalty kick.
As the 'offence', kicking the spare ball at the match ball and making contact with it, is NOT punsihable by a free kick or a penalty kick, all a referee can do is award a 'drop-ball' and punish the Red No.5 with a caution.
I do not see how the referee can send off the Red No.5 (no matter how much he would want to).
The offence which denies an opponent an obvious goalscoring opportunity may be an offence that incurs a direct free kick or an indirect free kick
Kicking an object be it a water bottle or a spare ball with the deliberate intention of interfering with play and it denies a goal scoring opportunity then that is a dismissal offence. If it happened anywhere else on the field of play it would be a caution for unsporting behaviour and an IDFK restart. Now if the spare ball/object is kicked at an opponent with excessive force that is deemed to be violent conduct and it is a dismissal and a direct free kick / penalty restart.
In the case of the spare ball contacting the match ball through a deliberate kick of the spare ball that is unsporting behaviour anywhere on the field of play, the player is cautioned and the restart is an IDFK from where the offence took place. In the case of denying a goal scoring opportunity where the ball has already left the kicker in this circumstance all the law allows for is a caution for unsporting behaviour and an IDFK from where the offence took place. It would only be a dismissal in the case of the spare ball being thrown by the player and the restart there is a DFK or a penalty or where the kick of the spare ball denied the opportunity then that is a dismissal and an IDFK.