I'm confused about the colours but trying to simplify for my own understanding:
Blue kicks long ball, from own 22, that goes dead. Normal decision for Red Captain, as his team did not make the ball dead, is 22DO or scrum at point of kick ie back in Blue 22.
You offer him this he selects, scrum back. This is the restart point.
However, following foul play by RED during the chase and attempt to ground the ball in goal, a penalty offence is committed by RED.
So the restart is penalty against RED but it must go back to where the scrum would have been.
Seems harsh but if the kicker can kick the ball dead from his own 22 then he should be able to do it again and get good lineout position and the throw.
Player in the bin good attacking lineout maybe its not too bad after all.