Well if there is a vacant house, I say give it to a homeless person. (If they're American) And pay the expenses until they get back on their feet. If they need help with anything, help them. If they are addicted to anything, supply it. Just enough to keep them functional in a workplace. You know, you can have some habit and still be able to work. And help them kick whatever habit they have. Some trade drugs for religion. It's hard to say which is worse. But the point is to at least get them off the street. A person shouldn't be homeless just because they made bad choices in life. Such as a "friend" who got them hooked on drugs.
As I was telling someone else around here, I used to be homeless. I used to be on welfare. Though you can bet your ass that I would have preferred to have a job. But there weren't any around at the time. Some clueless asshole around here refuses to believe that. It called me a liar on that point. Maybe I could have found a job, as a slave. I saw a job listing back then where somebody was looking for a person who could do things like pipe fitting, sheet metal fabrication and welding. I could do all those things. But they were only willing to pay minimum wage. Which at the time I think was $3.75 an hour. I just said fuck that shit. That's what they paid people to flip burgers.
As fot the costs you mentioned, it would probably be more than that. But it is just chump change. Back when our national debt was only around 19 trillion, every year we HAD to pay 420 billion a year just on the interest of that debt. Nobody was complaining. And every year out trade imbalance-debt with China alone was anywhere from 300 billion to over 700 billion. Nobody was complaining. But mention housing the homeless? Complain, complain, complain.