Are you sure that is all there is to the problem? If the road goes directly to Grandma's house, and Grandma lives miles away, Ms Red could get there in hours. That is the "least amount of time" she could take. But I suspect there is more to the problem, than that! Is there some geometry here? Where does the forest lie in relation to the two houses and the road?