"Homeless people" is a broad category that includes people temporarily living in vehicles, bouncing between family members, or sleeping on a friend's couch. It also includes people who are about to lose their home, young people living alone.
But when everyday people use the term, they usually mean, specifically, visible homeless people - i.e. people who are homeless long-term, sleeping rough on the streets or in parks, etc.
The two groups are pretty different to each other. I would be very surprised if the rate of drug addiction in the second group was the same as the rate of drug addiction in the first group