THE DECISION
As the red card offence occurred before the substitution, the player is sent off and the substitution is cancelled. The injured player can remain on the field of play for/after treatment. If the offence occurred when the ball was in play, play restarts with a direct free kick to Team A (or a penalty kick if it occurred in Team B's penalty area).
Read official Law 12 ↗