He did a marriage contract with a woman with the intention of making it permissible for her to go back to her first husband, then they both wanted to remain married
Question

My father gave me in marriage to a man with a bad character and attitude. I am thrice divorced by him, but my father is forcing me to go back to him through a tahleel marriage [one aimed at making it permissible for a thrice-divorced woman to go back to her first husband], with his approval of course. They are using a young man for that purpose; they gave me in marriage to him with a proper marriage contract, and their intention was by verbal agreement only. But when I moved to the house of the second husband (the muhallil), I did not see anything but good from him, to the extent that I began to like him. All of this is without him consummating the marriage with me; rather he has shown me respect, and he married me almost by force as well. Therefore we decided to remain married, and to flee from the tyranny of my father and my first husband, seeking the help and protection of my second husband, especially as he likes me too, and he knows of the suffering and verbal abuse to which I was subjected by my father. Is it permissible to continue in this marriage by changing my husband’s intention regarding the marriage from tahleel [making it permissible for me to go back to my first husband] to a genuine marriage? Or must we get divorced first, then do a new marriage contract? Please note that the marriage was done officially and proclaimed openly; the tahleel is a secret between them and no more, and the marriage contract is valid. How can we repent to Allah?
Praise be to Allah.Firstly:
Invalidity of the marriage of the muhallil
The marriage of the muhallil is invalid and is not right, regardless of whether he wants to keep his wife after doing the marriage contract or not, and the couple must be separated.
It says in Kashshaaf al-Qinaa‘ (5/94): The muhallil is so called because he aims to make something permissible (halaal) in a situation in which it cannot be made permissible, by marrying the thrice-divorced woman on the basis that once he has made it permissible for her to go back to her first husband, he will divorce her; or he stipulates that once he has made it permissible for her to go back to her first husband, then there will no longer be any marriage between them; or they agree before the marriage contract is done that once he has made it permissible for her to go back to her first husband, he will divorce her, or there will be no marriage between them before the marriage contract, and he does not change his intention when he does the marriage contract.
Or the muhallil intends that – i.e., that when he has made it permissible for her to go back to her first husband he will divorce her, and he does not change his intention at the time of doing the marriage contract. This type of marriage, in the format mentioned, is haraam and is not valid, because the Prophet (blessings and peace of Allah be upon him) said: “May Allah curse the muhallil and the muhallal lahu.” [The muhallil is the one who marries a woman and divorces her so that she can go back to her first husband, and the muhallal lahu is the first husband, for whom that is done]. Narrated by Abu Dawood and Ibn Maajah, and by at-Tirmidhi who said: It is a hasan saheeh hadith.
This is the correct view according to the people of knowledge among the companions of the Prophet (blessings and peace of Allah be upon him), including ‘Umar, his son and ‘Uthmaan. It is also the view of the fuqaha’ of the Taabi‘een, and it was also narrated from ‘Ali and Ibn ‘Abbaas.
Ibn Mas‘ood said: The muhallil and the muhallal lahu are both cursed on the lips of Muhammad (blessings and peace of Allah be upon him). Ibn Maajah narrated from ‘Uqbah ibn ‘Aamir that the Prophet (blessings and peace of Allah be upon him) said: ““Shall I not tell you of a borrowed billy-goat?” They said, Yes, O Messenger of Allah. He said, “He is al-muhallil. May Allah curse al-muhallil and al-muhallal lahu.”
It was narrated from Naafi‘ from Ibn ‘Umar that a man said to him: I married her in order to make it permissible for her to go back to her first husband. He did not tell me to do that, and he is not aware of it. He said: No [that is not valid] unless the marriage is genuine; then if you like her, keep her, and if you do not like her, then leave her. And he said: At the time of the Messenger of Allah (blessings and peace of Allah be upon him) we used to regard that as an illicit relationship. And he said: They would continue to be regarded as fornicators even if they remained together for twenty years. … if it was stipulated for him before doing the marriage contract that he should make it permissible for her to go back to the one who divorced her three times, and he agreed to that, then when doing the marriage contract he intended something other than what was stipulated, and that it is a genuine marriage, then it is valid. This was stated by al-Muwaffaq and others. End quote.
If this man intended, when doing the marriage contract, that it was a genuine marriage, then it is valid.
But if he did not intend that, as appears to be the case from the question, then the marriage is invalid and is not right.
Secondly:
It is not permissible for the woman to remain with the man who married her with the intention of making it permissible for her to go back to her first husband (tahleel)
It is not permissible for you to remain with this man or for him to look at you or be alone with you, because he is a stranger (non-mahram) to you. The fact that he now wants to take you as his wife does not affect the ruling, until he does a valid marriage contract with you.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: The marriage of a muhallil is haraam and invalid, and it does not make it permissible for the woman to go back to her first husband.
What this means is that if a man divorces his wife three times, she becomes haraam for him until she marries another husband, as Allah, may He be exalted, has stated in His Book, and as is mentioned in the Sunnah of His Prophet (blessings and peace of Allah be upon him), and his ummah is unanimously agreed on that. Therefore if a man marries her with the intention of divorcing her so that it will be permissible for her to go back to her first husband, this marriage is haraam and invalid, whether he decides to keep her after that or separate from her."  (Al-Fataawa al-Kubra 6/8).
Thirdly:
Separation of the couple in a tahleel marriage
If the couple entered into this marriage thinking that it was valid, and the woman’s guardian did the marriage contract on her behalf on that basis, then the couple must be separated, either through talaaq or khul‘, so as to ensure that they exit from that invalid marriage contract.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him) was asked:
A man married a woman with the intention of making it permissible for her to go back to her first husband, but after getting married he refused to divorce her. What advice can you give?
He replied:
If his intention was to make it permissible for her to go back to her first husband, then this is an invalid marriage and the one who did that is cursed – we seek refuge with Allah from that. The Messenger (blessings and peace of Allah be upon him) cursed the muhallil and the muhallal lahu. [The muhallil is the one who marries a woman and divorces her so that she can go back to her first husband, and the muhallal lahu is the first husband, for whom that is done]. It is a marriage for which the one who does it is cursed, and it is invalid and does not make it permissible for her to go back to her first husband, and she is not permissible for the second husband who married her with the intention of making it permissible for her to go back to her first husband, even if he later decides that he wants to keep her.
Rather he must divorce her with one talaaq, to cancel this invalid marriage contract and remove all dubious elements.
After that, she has the choice: if she wishes, she may marry him, and if she wishes, she may marry someone else after the end of her ‘iddah, if he had intercourse with her. Once her ‘iddah ends – following three menstrual cycles if she menstruates, or following three months if she is old and does not menstruate, or she is young and has not yet begun to menstruate – then she may marry whomever she wishes, except her first husband, until someone else has married her in a legitimate marriage and had intercourse with her, in a genuine marriage with no intention of tahleel, then he divorces her or dies, after which it becomes permissible for her to marry her first husband.
As for this one who wanted make it permissible for her to go back to her first husband, even if he had intercourse with her, it does not become permissible for her to go back to her first husband, and he is sinning in his actions and is cursed, as it says in the hadith. He must separate from her by issuing one talaaq, then after they repent and her ‘iddah ends, he may marry her anew if she agrees to that. End quote.
Fourthly:
How to correct the marriage contract in the case of a tahleel marriage
If he wants to marry you, then he must meet the conditions of a valid marriage, which should be done by your guardian in the presence of two witnesses of good character.
If your father refuses to give you in marriage to him, and the man is compatible and suitable, then you may be given in marriage by the next in line of your guardians. If they all refuse, you should refer your case to the shar‘i judge (qaadi) to give you in marriage.
The order of guardians for a woman is as follows: her father, then her adult son (if she has a son), then her grandfather, then her brother, then her paternal uncle, then the son of her paternal uncle, in the order of male relatives on the father’s side.
We affirm that you must keep away from him now, so he should leave the house or you should go back to your family’s house, and it is not permissible for him to look at you or to be alone with you [at present].
And Allah knows best.