Here's the breakdown:
* The duel: Hamlet and Laertes are engaged in a fencing match, orchestrated by Claudius and Laertes to kill Hamlet.
* The poisoned sword: Laertes' sword is tipped with poison.
* Claudius's plan: Claudius has also prepared a poisoned cup of wine for Hamlet, intending to kill him if the sword fails.
* Hamlet's death: Hamlet is wounded by the poisoned sword and drinks from the poisoned cup.
* Claudius's death: Hamlet, in his dying moments, reveals Claudius's treachery and kills him.
Therefore, Hamlet does not kill Claudius before the duel; he kills Claudius after being mortally wounded.