Remember the scene in Titanic? yung nasa kotse si Leonardo diCAprio and KAte Winslet sa kotse? ito yung photo...
Misting forms on the hotter side of the glass. In Titanic's case, the mist formed inside because the temperature is hotter inside compared to the temperature outside.
So when the mist forms inside the car, the temp inside is hotter that outside, thus, turn on the AC.
When the mist forms outside, the temp inside is cooler than outside, thus, turn off the AC or for faster results, turn on the wiper and/or the heater in the rear windshield.