The rules prescribe that you are not allowed to taken penalty within the zone. But that is only for the zone of a rounding mark! The pin-end of the finish is not a rounding mark, it is a passing mark. Therefore penalties are allowed in that zone.
The big advantage of taking your penalty around that mark is that you can finish directly after having completed your penalty - even with little boat speed - by bearing away to the line. It is one manoeuvre that - if you've done your training - has been done a hundred times before.
The Blue boat with the outstanding penalty needs to be approximately 4 to 5 boat lengths ahead, to be able to complete the penalty and still finish first. She enters the zone clear ahead and Yellow must give mark-room in position 1. Blue luffs after passing the mark and makes sure that her spinnaker head is below the goose-neck. (Something that has to be done before passing head to wind, that's when Blue is starting to take her penalty)
Passing head to wind she losses her mark-room under rule 18.2(b) and must keep clear under rule 21.2.
As soon as Blue has reached a course 90 degrees from true wind the penalty is complete. (in position 6). She's on port tack and Yellow is on starboard tack. So Blue is still keep clear boat. But because she now has an overlap with Yellow and is within the zone, rule 18 again switches on again. Blue is inside boat and Yellow must give her mark-room, under rule 18.2(a). Blue is already at the mark, so she's entitled to sail her proper course. Which is to bear away and finish as soon as possible. Yellow must gybe or sail by the lee, to give Blue that room.
Boom?
There's one other thing - besides getting the spinnaker down in time - that is your boom. With bigger boats the boom is almost at a ninety degree angle and really sticks out. In rounding the mark it happens that the boom sticks out so far, that the end is over the mark and over the line. Rule C7.2(d) however dictates that the boat must completely be on the course side, after having completed her penalty, before she can finish. Part of the boom may never be on the correct side. So she can't finish.
If the RC gets a heads up from the umpires about the leading boat having an outstanding penalty, they watch - particularly that boom - so see if Blue ever manages to get completely to the course side, before crossing the line for the second time.
J.