What is the reference of hadith , whose approximate interpretation is that Prophet Ibraheem (Peace Be Upon Him) gave a message for his son ,Prophet Ismaeel(Peace Be Upon Him) to divorce his wife
This story appears in a long hadith in Sahih al-Bukhari. I'd recommend you to read the whole hadith as I will only display here the relevant part:
... After Ishmael's mother had died, Abraham came after Ishmael's marriage in order to see his family that he had left before, but he did not find Ishmael there. When he asked Ishmael's wife about him, she replied, 'He has gone in search of our livelihood.' Then he asked her about their way of living and their condition, and she replied, 'We are living in misery; we are living in hardship and destitution,' complaining to him. He said, 'When your husband returns, convey my salutation to him and tell him to change the threshold of the gate (of his house).'
When Ishmael came, he seemed to have felt something unusual, so he asked his wife, 'Has anyone visited you?' She replied, 'Yes, an old man of so-and-so description came and asked me about you and I informed him, and he asked about our state of living, and I told him that we were living in a hardship and poverty.' On that Ishmael said, 'Did he advise you anything?' She replied, 'Yes, he told me to convey his salutation to you and to tell you to change the threshold of your gate.' Ishmael said, 'It was my father, and he has ordered me to divorce you. Go back to your family.' So, Ishmael divorced her and married another woman from amongst them (i.e. Jurhum). ...
Just to explain the context Ibraheem () visited his son and didn't find him and spoke to his wife who kept on complaining her miserable life (with her spouse). This made him think that this wife was a bad fit for his son so he asked her to leave his son a message with a hint.
He said, 'When your husband returns, convey my salutation to him and tell him to change the threshold of the gate (of his house).'
Ismaeel () was able to understand the hint and followed his father's recommendation and divorced her and married another woman from among her tribe. Ibraheem () later on visited them, but this time he met a wife who was thankful for her life, and left his son the message to keep her saying:
"When your husband comes, give my regards to him and tell him that he should keep firm the threshold of his gate.' (Same source as above)