based on the description, this is an example of: Stimulus generalization
Stimulus generalization happens if people start to develop a tendency to react if they're exposed to a certain stimulus, no matter what the context is.
In this case, the green light served as a stimulus for the driver before he decided to do the actions