The movie Prisoners is quite difficult to understand. I am still trying to understand how Joy escaped.
When Joy was in the hospital, it seems that Bob was in her flashback. So did he help her escape?
Do we know where was she found?
The kidnapper Holly Jones mentions that she brought the girls from the underground prison to her house because she was lonely with Alex Jones gone.
Joy's flashback in the hospital indicates that, at some point while they are in the house, Keller Dover shows up for his visit with Holly Jones. Joy and Keller's daughter are both drugged and mostly unconscious, but Joy hears or otherwise senses that Keller is on the property, so that's why she mentions it in the hospital.
Later, the girls somehow managed to make a run for it from the house - but only Joy succeeds in getting away. The flashback shows Joy running through some woods and then arriving at the edge of a freeway, where presumably she was rescued by passers-by.