Depends
It is not a one or the other question..
If you round the leeward mark behind your comp. (but fairly close), you obviously have 2 choices: split away and head for the other side of the course, or follow. The answer depends on what the wind is doing-unfortunately it is not as simple as a one or the other choice.
Assuming a port rounding, if the boat ahead continues on port tack (towards the right side of the course), you will decide which course of action based on wind shifts.
If you have detected that the breeze is tending to shift to the left ( as seen looking upwind), then you should definitely tack away to starboard. You will be sailing into a progessive header. The leader will tack to cover you, but you have the advantage now since you are the leeward boat sailing into a header. Gradually, he will "sag" down towards your stern as the shift progresses, and when you think you might be able to cross him, tack. If things went great, you will be ahead (although if the breeze is still going left, you should tack close to leeward of him-if you get to the right of him in this example, he will now be able to do to you what you did to him!! Protect that side of the course!). Either way you have gained. The limitation on this that you must be careful not to get so far off to one side of the course while taking advantage of that header that you end up overstanding the windward mark once you tack..
If the breeze is going right, then you should follow, BUT ease sheets and try to foot through his wind shadow. If you do this correctly, once you break through the shadow into clear air, you can then sheet back in and you will now be the leeward boat sailing into a header-gaining as the breeze goes farther right. At some point, he will begin to sag into your stern (you will now be "bow out" and slightly ahead), and get bad air from your rig, and be forced to tack off to the left (bad in this case for him) for clear air. When he tacks back, you will be gaining even more since all that distance going left (in a right shifting breeze) is a loss to him.
Again-beware of getting caught too far out on one corner or the other!
That was the easy solution. If the breeze is occillating (as opposed to a persistent shift), then you should tack away for clean air, and if you have not already figured out the period of the occilations (they are always shifting on a regular interval, say 10 minutes from max left to max right, or 4 min or 15 min, but it is always consistent), watch the compass or TWD indicator. You may have to sail through one or two periods to get the timing down, but once you see the right side shift, for example, has maxed out, and is now starting to go left, get on port tack and ride it(the lift for you) until it has maxed and the breeze is now starting to go right, then tack to starboard, etc. This way you will always be sailing on a lift-hence the adage "tack on the headers". This is what is known as being "in phase" with the shifts. If the leader just plugs away to the right, you will eventually catch him by staying "in phase" with the shifts, and sailing the shortest course upwind. The bad news is that he will do this as well if he knows what he is doing-but you still have an option (as long as he is concerned with covering only you). As you approach him on the opposite tack(but still behind), and you see you are beginning to sail into the lift (which you would normally want to stay with), tack to leeward of him. This will confuse, him, make him happy thinking you are too dumb to know what tack to be on..What will happen, though is you will be again "leading" him into a header, and gaining all the time. If you are basically match racing one boat, and behind, you should tack on each lift (the opposite of what you want to when sailing against the clock or not being covered). This makes him the windward, outside boat while the both of you are sailing into a header. In this case, the windward, outside boat loses to the other boat. Eventually you will come at him on starboard and he won't be able to cross you!!
Once you have done this, get back in phase and tack on the headers again to keep gaining up the course..
Whew! We just covered a lot of stuff, and there are more nuances to this process, but this is the basic approach.
Final exam is tomorrow!
Seth