The physician drank a weak poison before the competition.
The reason why this works is that, as mentioned, a stronger poison acts as a cure for the weaker poison, neither having an effect. So, when the competition started, the physician drank the opponent’s, undoubtedly strong, poison, which countered the poison already in his system, and then he drank harmless wine.
The opponent, on the other hand, had no poison in his system prior, so the drink of wine did nothing, and then he drank his own poison and died.
I’ve heard this one before, but in a slightly different context (I’m pretty certain there was a king involved somewhere).