3 doors

A prisoner is trapped in a cell containing three doors. The first door leads to a tunnel that returns him to his cell after two days of travel. The second leads to atunnel that returns him to his cell after three days of travel. The third door leads immediately to freedom. Let X=the number of days until theprisoner reachesfreedom.

a. Assuming that the prisoner will always select doors 1, 2, and 3 with probabilities
0.5, 0.3, 0.2, make an argument that X is a proper random variable (i.e. the
prisoner will not be trapped in his cell forever.). Additionally, what is the
expected number of days until he reaches freedom?
b. Assuming that the prisoner is always equally likely to choose among those doors
that he has not used, what is the expected number of days until he reaches
freedom? (In this version, for instance, if the prisoner initially tries door 1, then
when he returns to the cell, he will now select only from doors 2 and 3.)
c. For parts (a) and (b) find the variance of the number of days until the prisoner
reaches freedom.