As a retired LEO I have a few thoughts about this. Under the U.S. v Laub, Cox v Louisiana, and Raley v Ohio cases cited here, one would have to have act upon a "good faith reliance" from a "authoritative assurance [emphasis added]" that they believe that they wouldn't be punished for committing a crime. I think that it would be quite difficult to convince any judge that 1) the officer enticed you to race with impunity, and 2) that a reasonable person would believe that an officer that was actively encouraging you to race on the public roadways, thereby placing the public in danger, had any such authority to do so. I think that you lack both a good faith reliance (you know it's wrong and you know that the officer is wrong for encouraging it) and an authoritative assurance (don't think an officer who is clearly acting outside of his authority can provide any form an an assurance that is "authoritative"). Imagine if the officer told you to rob the bank with him and he tells you that it's okay because he's an officer. Just doesn't fly.
Entrapment doesn't work either. This concept is pretty simple. The government actively encourages you to take an illegal act that you wouldn't have taken absent that persuasion, with the intent of prosecuting you for it. A significant question here is whether the officer is acting as an agent of the government. Most of the times the answer would be yes, but in this instance the officer would clearly be operating outside of the authority vested in him by the government. Even when you view the evidence in a manner that is most favorable to the driver, which I think the law would require in most places, I don't think you can overcome significant obstacles in this defense.
If you add to the scenario a bit it becomes a little easier to see how this would play out in reality. Imagine the cars racing down the highway and one of them crashing into another vehicle, killing one of the occupants. Being that both individuals were involved in a "crime" that resulted in a death, both individuals are now responsible for that death, regardless of the fact that one of them happens to be an on-duty officer. You're going to need more than a "but he told me to" defense.