Explaining the rules of the game:
There are three doors. Only one contains the prize. You choose one door first, then Monty Hall opens one of the other two doors that doesn't have the prize. If there are two doors to pick from, he'd choose at random. If you choose a door, then Monty Hall opens another door, should you change your choice to the other door?
Let's call the doors are 1, 2 and 3. $C_1$ means the prize is behind door 1 and $O_1$ means door 1 is opened. So $P(C_2|O_3)$ would be the probability that the car is behind door 2 given that door 3 is opened while $P(O_3|C_2)$ would be the probability that Monty hall opens door 3 given that the prize is behind door 2.
We assume we pick door 1 first. Then Monty Hall opens door 3. So we're to find the probability that the prize is behind door 2 given that Monty Hall opens door 3.
Using Bayes theorem: $$P(C_2|O_3) = \frac{P(O_3|C_2)\cdot P(C_2)}{P(O_3)}$$ $$=\frac{P(O_3|C_2)\cdot P(C_2)}{P(O_3|C_1)\cdot P(C_1) + P(O_3|C_2)\cdot P(C_2) + P(O_3|C_3)\cdot P(C_3)}$$
There is an equal chance of the prize being behind every door so $P(C_1) = P(C_2) = P(C_3) = \frac{1}{3}$
$P(O_3|C_1)$: The car is behind door 1 and we've picked door 1. Therefore Monty Hall has doors 2 and 3 to choose from. $P(O_3|C_1) = \frac{1}{2}$
$P(O_3|C_2)$: The car is behind door 2 and we've picked door 1. Therefore Monty Hall only has door 1 to pick. $P(O_3|C_2) = 1$
$P(O_3|C_3)$: The car is behind door 3 so Monty Hall cannot open door 3 so this would be equal to 0.
$$P(C_2|O_3) = \frac{1\cdot \frac{1}{3}}{\frac{1}{2} \cdot \frac{1}{3} + 1 \cdot \frac{1}{3} + 0 \cdot \frac{1}{3}} = \frac{2}{3}$$
There's a higher chance that the car is behind the other door so it's a better choice to switch.
I'm not sure if I'm allowed to do this. Just wanted to answer the question since I didn't find any solutions that fully explained it.