Assuming the person walking is Jewish, that the light always turns on and that the person walking benefits from its light, then it is forbidden to walk towards it intentionally. This is called psik reisha, i.e., something that you know will happen, and it is forbidden when done intentionally.
R Eliezer Melamed writes in Peninei Halacha
One may not enter a room where doing so automatically turns on the
lights or air conditioning. While one might claim that he did not
intend to turn on the lights or air conditioning by entering the room,
the fact is that everyone knows how the system works in such places.
If the person doesn't care for the light (e.g., a streetlamp that adds light to a path you want to walk on during Shabbat, but you would have walked there anyway), then it becomes psik reisha de lo nichalei (an expected event you don't want) and many are lenient. R Melamed continues
What if the hotel guest is inside such a room when Shabbat begins, and
he knows that if he leaves he will cause the lights or air
conditioning to shut off? If he can easily stay inside until after
Shabbat, or if a non-Jew is due to come shortly to disable the system,
it is preferable to wait inside. However, if doing so causes him
anguish, he may leave the room or bathroom because the purpose of this
system is to save the hotel money by conserving electricity. The hotel
guest does not care about that, so it is a case of psik reisha de-lo
niĥa lei regarding a rabbinic prohibition (since all agree that the
prohibition of turning off the lights or air conditioning is
rabbinic). When necessary, in such a case, one may be lenient.
I do not see however why someone would have to walk away from the area. It would be a good idea to call out to the second person she cannot walk there (do not place a stumbling block in front of the blind) but staying there is not forbidden.
Of course, should this become a real scenario, ask a rav and don't trust Internet strangers.