We were first introduced to the primary location, Princeton University, at the beginning of the film. We are expected to deduce that is the location, based on appearances of students in the classroom and the design of the buildings. At first, we see John Nash, struggling to make connections with his newly met colleagues. He then meet his roommate, Charles Herman, and they both drink on Princeton's campus rooftop.
Fast forward 5 years later, we are now shown a new location, the Pentagon, where John Nash is shown to be deciphering codes for the government. It is still unclear to this day if it is a part of his delusions, or perhaps it is true that he did the work one-time.
Nash spent most of his time in Massachusetts Institute of Technology, where while continuing his research along with Sol and Bender, he's doing 'governmental work' at the Pentagon. Here, it is still unclear whether he's truly working at Pentagon or it is one of his delusions.
Then, the location changed to a warehouse in MIT compound, where it houses a Department of Defense base. There, John were invited by William Parcher to decode 'secret Soviet plans' in magazines and newspapers. He was required to post his completed assignment at a house in the mailbox.
We then move to a new location, a psychiatric facility, where John spend a year being hospitalized.
After being released from the facility, he stays at home while he recovers and is given medicine to control his delusions.
Most of the location centralized around Princeton, New Jersey, with exceptions when he worked at Wheeler Laboratory at Massachusetts and his frequent trip to Pentagon, Washington D.C.