Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:65:6

Lodge them ˹in a section˺ of where you dwell out of your means and do not harm them in order to oppress them. And if they should be pregnant, then spend on them until they give birth. And if they breastfeed for you, then give them their payment and confer among yourselves in the acceptable way; but if you are in discord, then there may breastfeed for the father another woman.  

Lodge them, that is, the divorced women, where you dwell, that is to say, in some part of your dwellings, in accordance with your means (min wujdikum is an explicative supplement, or a substitution of what precedes it with the repetition of the same preposition ˹min˺ and with an implied genitive annexation, in other words, ˹something like˺ amkinat sa‘atikum, ‘˹house them in˺ the places of your means and not otherwise’) and do not harass them so as to put them in straits, with regard to accommodation, such that they would then need to go elsewhere or ˹be in need of˺ maintenance ˹to provide for themselves˺ so that they ˹are forced to˺ ransom themselves from you. And if they are pregnant, then maintain them until they deliver. Then, if they suckle for you, your children ˹whom you have˺ from them, give them their wages, for the suckling, and consult together, with them, honourably, with kindness, for the sake of the children, by mutual agreement on a fixed wage for the suckling. But if you both make difficulties, regarding the suckling, with either the father withholding ˹payment of˺ the wage or the mother refraining from performing it, then another woman will suckle ˹the child˺ for him, for the father, and the mother should not be compelled to suckle it.
القرآن:٦٥:٦

أَسْكِنُوهُنَّ مِنْ حَيْثُ سَكَنْتُمْ مِنْ وُجْدِكُمْ وَلَا تُضَارُّوهُنَّ لِتُضَيِّقُوا عَلَيْهِنَّ ۚ وَإِنْ كُنَّ أُولَاتِ حَمْلٍ فَأَنْفِقُوا عَلَيْهِنَّ حَتَّىٰ يَضَعْنَ حَمْلَهُنَّ ۚ فَإِنْ أَرْضَعْنَ لَكُمْ فَآتُوهُنَّ أُجُورَهُنَّ ۖ وَأْتَمِرُوا بَيْنَكُمْ بِمَعْرُوفٍ ۖ وَإِنْ تَعَاسَرْتُمْ فَسَتُرْضِعُ لَهُ أُخْرَىٰ  

{أسكنوهن} أي المطلقات {من حيث سكنتم} أي بعض مساكنكم {من وجدكم} أي سعتكم عطف بيان أو بدل مما قبله بإعادة الجار وتقدير مضاف، أي أمكنة سعتكم لا ما دونها {ولا تضاروهن لتضيقوا عليهن} المساكن فيحتجن إلى الخروج أو النفقة فيفتدين منكم {وإن كن أولات حمل فأنفقوا عليهن حتى يضعن حملهن فإن أرضعن لكم} أولادكم منهن {فآتوهن أجورهن} على الإرضاع {وأتمروا بينكم} وبينهن {بمعروف} بجميل في حق الأولاد بالتوافق على أجر معلوم على الإرضاع {وإن تعاسرتم} تضايقتم في الإرضاع فامتنع الأب من الأجرة والأم من فعله {فسترضع له} للأب {أخرى} ولا تكره الأم على إرضاعه.