Divorce Given In Different Instances
Talaq is valid only when given with a genuine intention. In the first instance, there was no real intention to issue Talaq. In the second instance, the Talaq was deliberate. However, only one Talaq has taken effect; the second is considered frivolous, as Talaq must be issued on three separate occasions. Therefore, your nikah remains valid.