Escalating housing prices are forcing teachers, law enforcement officers and other public employees in some communities to live far away from their jobs, according to a study released Wednesday.