Two people meeting, expected time of waiting $A$ and $B$ are supposed to meet. 
$A$ arrives in a randomly chosen (uniform distribution) moment between $2$ and $3$ pm.
$ B$ arrives at $2$ pm with probability equal to $0,5$ and in a randomly chosen (with uniform distribution) moment between $2$ and $3$ pm with probability $0,5$
.
Find the expected value of the amount of time which the person who arrives first spends waiting for the other.
Here are my thoughts:
$A$ has a uniform distribution on $[2,3]$ , but I don't know what the random variable for person $B$ looks like.
We need to express random variable whose values are amounts of time of waiting, using the random variables we find for person $A$ and $B$.
Could you explain to how to do that and tell me if it's a good approach?
 A: The random variable for $B$ has pdf $g(b)=1/2$ over the interval from $t=2$ to $t=3$, together with a point mass of $1/2$ at $t=2$.  As you've pointed out, $A$ has pdf $f(a)=1$ on this interval.  To compute the expected waiting time, it's convenient to break the calculation up into three disjoint pieces:


*

*$B$ arrives at $t=2$

*$B$ arrives later ($t>2$), but before $A$

*$A$ arrives before $B$


The first case contributes $${\rm Pr}(B=2) \int_2^3 (a-2)f(a)\,da = 1/4$$ to the expectation.  The second case contributes $$\int_2^3 f(a)\,da \int_2^a (a-b)g(b) \,db=1/12.$$  The third case also contributes $1/12$; I leave that integral to you.  So the expected waiting time is $5/12$ hour, or $25$ minutes.
A: Isn't a good approach to calculate the average wait time if B arrives at 2pm (50% probability) and the average wait time if B doesn't arrive at 2pm (50% probability), then average these two average times out, in 50% - 50% proportion.
If B arrives exactly at 2pm, then B's average wait will be 30 minutes.
If B doesn't arrive exactly at 2pm, I believe the average wait time (by A or B) will be a third of the maximum wait time, or 20 minutes (I'm basing this on the answer I got to a very similar question about what the average difference was between two odd numbers with the same number of digits).
Weighting these two figures 50% - 50% as per the probabilities for the two scenarios, you arrive at an average wait time of 25 minutes.
