Reconciling between the hadiths which forbid tahleel and the hadith about the wife of Rifaa‘ah
Question

 
Prophet peace be upon him said.
Abu Dawud narrated that the Prophet (peace and blessings be upon him) said: “Allah has cursed the muhallil and the muhallallahu".
The muhallilis the one who marries a woman and divorces her so that she can return to her first husband, and the muhallallahuis the first husband.
IbnMajah narrated from `Uqbah ibn `Aamir that the Prophet (peace and blessings 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-muhalliland al-muhallal lahu.”
Which means that Doing Halala is harram in Islam but on the other hand when i found this hadith,
Dawud :: Book 12 : Hadith 2302 Narrated Aisha, Ummul Muminin:
The Apostle of Allah (peace_be_upon_him) was asked about a man who divorced his wife three times, and she married another who entered upon her, but divorced her before having intercourse with her, whether she was lawful for the former husband. She said: The Prophet (peace_be_upon_him) replied: She is not lawful for the first (husband) until she tastes the honey of the other husband and he tastes her honey.
Doesnt it mean these are contradictory that at one side prophet is cursing and other side he is allowing to do marriage for the purpose of Divorce so she can consume marriage with the previous husband.
Praise be to Allah.There is no contradiction between these hadiths. If a man marries a woman who has been divorced three times with the intention of making her permissible for the first husband (tahleel marriage), this marriage is haraam and is that which the Messenger of Allah (blessings and peace of Allah be upon him) cursed the one who does it. 
As for the hadith about the wife of Rifaa‘ah, it does not say that ‘Abd al-Rahmaan ibn al-Zubayr married her with the intention of tahleel. Rather the reports of the hadith indicate that he married her and wanted to keep her, and he did not divorce her just because she asked for a divorce. Rather she wanted to go back to her first husband, but the Prophet (blessings and peace of Allah be upon him) explained to her that that would not be permissible for her until the second husband consummated the marriage with her; she had said that he had not consummated the marriage with her. 
There follow some of the versions of the hadith about the wife of Rifaa‘ah. 
It was narrated by al-Bukhaari (2639) and Muslim (1433) from ‘Aa’ishah (may Allah be pleased with her) that: The wife of Rifaa‘ah al-Qurazi came to the Prophet (blessings and peace of Allah be upon him) and said: I was married to Rifaa‘ah, then he divorced me and made the divorce irrevocable. Then I married ‘Abd al-Rahmaan ibn al-Zubayr. He said: “Do you want to go back to Rifaa‘ah? No, not until you taste his (‘Abd al-Rahmaan’s) sweetness and he tastes your sweetness.” 
Muslim (1433) narrated that ‘Aa’ishah (may Allah be pleased with her) said: A man divorced his wife three times, then another man married her and divorced her before consummating the marriage with her. Her first husband wanted to remarry her, and the Prophet (blessings and peace of Allah be upon him) was asked about that. He said: “No, not until the second husband tastes of her sweetness what the first one tasted.” 
So it does not say in the hadith that ‘Abd al-Rahmaan married her with the intention of tahleel (making her permissible for her first husband). Rather she is the one who wanted to go back to her first husband, and the fact that this intention was present on her part does not make the marriage a tahleel marriage, because the power of divorce was not in her hand. 
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: 
Because the Prophet (blessings and peace of Allah be upon him) permitted her to go back to her first husband if the second husband had intercourse with her, after it became clear to him that she wanted to go back to the first husband, and it made no difference whether this desire arose after the marriage contract was done or was present before that, this indicates that it was permissible for her to go back to (the first husband) in either case. Usually if a woman is comfortable with her husband then he divorces her, she may still feel something for him in many cases; women usually dislike divorce and would like to go back to the first husband more than they would like to live with someone else… End quote. 
Al-Fataawa al-Kubra, 6/301 
Ibn ‘Abd al-Barr (may Allah have mercy on him) said: 
In the words of the Prophet (blessings and peace of Allah be upon him) to the wife of Rifaa‘ah, “Do you want to go back to Rifaa‘ah?” There is an indication that the woman's desire to go back to her (first) husband does not affect the one who has done the marriage contract with her, and that does not come under the same heading as tahleel, in the case of which the one who does it deserves to be cursed. End quote. 
Al-Tamheed, 13/227 
Ibn al-Qayyim (may Allah have mercy on him) said: 
The intention of the wife or her guardian does not have any effect; rather what counts is the intention of the second husband. If he intends to make it permissible for her to go back to her first husband (tahleel), then he is muhallil and deserves to be cursed, as does the husband who divorced her, if she goes back to him by means of this invalid marriage. But if neither the second husband nor the first husband was aware of what was in the mind of the woman or her guardian of the intention of tahleel, that does not affect the marriage contract at all. The Prophet (blessings and peace of Allah be upon him) was aware that the wife of Rifaa‘ah wanted to go back to him and he did not make that the reason to prevent her going back to him; rather what prevented her going back to him was the fact that the second husband had not had intercourse with her, so he said, “not until you taste his sweetness and he tastes your sweetness.” End quote. 
I‘laam al-Muwaqqi‘een, 4/45-46 
And Allah knows best.