It'll cost less to the UK if the homeless are helped in their own countries.
In the long run they'll lose out. Immigrants accepted and put into a situation where they can build wealth of their own are a net boon to a nation. Simply having more people makes a nation greater. More people means more taxes, and business owners and investors, more scientists and engineers and mathematicians, more philosophers and thinkers and artists. More people means more soldiers, more grunts, navy and airmen, more laborors and builders and construction workers, more teachers and surgeons. People are the source of all power in our world. Small growing pains here and there are worth the gain, especially when our natural rivals are already outpacing us in several crucial areas.
This is why Nigeria has vastly greater GDP than South Korea, Australia, or Sweden.