This problem is from Introduction to Probability by Blitzstein and Hwang (Chapter 2, exercise 41).
You are the contestant on the Monty Hall show. Monty is trying out a new version of his game, with rules as follows. You get to choose one of three doors. One door has a car behind it, another has a computer, and the other door has a goat (with all permutations equally likely). Monty, who knows which prize is behind each door, will open a door (but not the one you chose) and then let you choose whether to switch from your current choice to the other unopened door.
Assume that you prefer the car to the computer, the computer to the goat, and (by transitivity) the car to the goat.
(a) Suppose for this part only that Monty always opens the door that reveals your less preferred prize out of the two alternatives, e.g., if he is faced with the choice between revealing the goat or the computer, he will reveal the goat. Monty opens a door, revealing a goat (this is again for this part only). Given this information, should you switch? If you do switch, what is your probability of success in getting the car?
(b) Now suppose that Monty reveals your less preferred prize with probability p, and your more preferred prize with probability q = 1 − p. Monty opens a door, revealing a computer. Given this information, should you switch (your answer can depend on p)? If you do switch, what is your probability of success in getting the car (in terms of p)?
I have no clue where to start with this one. Any help or solutions?