Sarah obtained Max at a certain point before she acquired the jeep that took her to Mexico.
Terminator 2: Judgment Day
When John called home to warn the Voights, Max, recognizing "Janelle" as a Terminator imposter, barked furiously. John therefore feared that the T-1000 was already at the house, and asked the T-800 at his side about this. The T-800 then proceeded to speak with the T-1000 over the phone, imitating John's voice. After learning the dog's real name Max from John, he asked "Janelle" why Wolfie was barking. "Janelle" failed to recognize that the name was incorrect, assuring that "Wolfie" was just fine. Thus the T-1000 inadvertently gave away that it was not the real Janelle. The T-800 immediately hung up and informed John that his foster parents were dead.
In the other end, the T-1000 morphed back to its default form. A deleted scene shows how it proceeded to go outside and kill Max. The T-1000 then read Max's name on his bloody collar and, seeing that his name was not Wolfie, realized that the T-800 had tricked him.