All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Divorce takes place by the husband uttering it and it also takes place by him writing it while intending to initiate it; for more benefit, please refer to Fataawa 89894 and 87034.
Therefore, if your husband had uttered divorce the first time or that he wrote it with the intention of initiating it, then divorce took place. However, we do not know what he meant by saying that it took place by mistake from the lawyer.
As regards the two last divorces, then if he had intended to initiate divorce by writing them, then two divorces took place. If these two divorces were interrupted by him taking you back, then it is clear that two divorces took place, and if they are not interrupted by him taking you back, like if they are issued at one session for instance, then there is a well-known controversy among the scholars about this issue whether they are one or two divorces, and this is clarified in Fatwa 94110.
The most preponderant opinion in our view is that two divorces took place. Then (assuming that the first divorce had taken place), you are irrevocably divorced from your husband and you would not become lawful for him unless you marry another man a true marriage and he consummates the marriage with you and then he divorces you or dies. For more benefit on the kinds of divorce, please refer to Fatwa 82541.
Finally, the two following matters should be noted:
1- We have received a similar question, so if it was sent by you, and the case is the same, then you should take into consideration this current Fatwa in which we clarified the details.
2- It is better to resort to an Islamic court in your country, if any, and if there are none, then you may consult the trustworthy Islamic Centers in non-Muslim countries.
Allaah Knows best.