Although the srict moral understanding would be no, I would give a bit of leadway depnding on the circumstances.
Supposing the husband has no money and can’t afford to live anywhere else. We can only do what we can do. I would not classify it as sinful but it may have the makings of a very bad situation. If he can not find another place of residency and has honestly tried. The best case scenario would be for him to move out of the apartment with the other women when he is able to land on his feet in due time which is always wishful thinking in itself.
Several problems arise. The first being the couple themselves. If there is the remote possibility of reconcilliation this roomate situation obviously would not improve that possibility. The second would involve children, especially if they are young. Expalining a divorce might be a cake walk compared to explaining the housing situation and the “just roomates” to a child will not be easy nor will it be understood. A father living with some woman other than mom obviously creates problems itself regardless of the innocence of the situation.
If your friend has to do this because he has no other means than that is simply the way things are. It is not a good situation no matter how its looked at but sometimes we have to make due. I would suggest to him that he not get too comfortable in his new place but do what it takes to get out as quickly as possible.
In addition, I like almost all others, hate to see a marriage come to an end. But perhaps they should think of seperation rather than a divorce so soon. There are marriage counselors, not psychiatrists and such, but even real catholic marriage counselors who may be able to help. My parents have saved numerous marriages, but it obviously depends on finding the right help. I wouldn’t want you to be put in the middle of this problem but marriages are never beyond saving, it might just take more work and a period of seperation. Just a side thought