If Monty opens the door by chance there are 3 equally likely cases: There's a 1/3 chance you picked the car and Monty shows you a goat, 1/3 chance you picked a goat and Monty shows you the other goat, 1/3 chance you picked a goat and Monty shows you a car. So if Monty shows you a goat you have equal probability of being in one of the first two cases.
If Monty doesn't open the door by chance then he never shows you a car. So 2/3 of the time you picked a goat and Monty shows you the other goat.