In line with the Qur'anQur'an 65:6 ↗أَسۡكِنُوهُنَّ مِنۡ حَيۡثُ سَكَنتُم مِّن وُجۡدِكُمۡ وَلَا تُضَآرُّوهُنَّ لِتُضَيِّقُواْ عَلَيۡهِنَّۚ وَإِن كُنَّ أُوْلَٰتِ حَمۡلٖ فَأَنفِقُواْ عَلَيۡهِنَّ حَتَّىٰ يَضَعۡنَ حَمۡلَهُنَّۚ فَإِنۡ أَرۡضَعۡنَ لَكُمۡ فَـَٔاتُوهُنَّ أُجُورَهُنَّ وَأۡتَمِرُواْ بَيۡنَكُم بِمَعۡرُوفٖۖ وَإِن تَعَاسَرۡتُمۡ فَسَتُرۡضِعُ لَهُۥٓ أُخۡرَىٰ
Allow them to reside where you reside, according to your means, and do not harass them in order to make things difficult for them. If they are pregnant, spend on them until they give birth. And if they nurse your infant, give them their payment. And conduct your relation in amity. But if you disagree, then let another woman nurse him.
The verse orders husbands to house divorced women where they themselves live, according to their means, so the housing cost falls on the husband.
In line with the Qur'anQur'an 65:7 ↗لِيُنفِقۡ ذُو سَعَةٖ مِّن سَعَتِهِۦۖ وَمَن قُدِرَ عَلَيۡهِ رِزۡقُهُۥ فَلۡيُنفِقۡ مِمَّآ ءَاتَىٰهُ ٱللَّهُۚ لَا يُكَلِّفُ ٱللَّهُ نَفۡسًا إِلَّا مَآ ءَاتَىٰهَاۚ سَيَجۡعَلُ ٱللَّهُ بَعۡدَ عُسۡرٖ يُسۡرٗا
The wealthy shall spend according to his means; and he whose resources are restricted shall spend according to what God has given him. God never burdens a soul beyond what He has given it. God will bring ease after hardship.
The verse ties the obligation to what one has, matching the report's shift of the cost when the husband has nothing.