2) If you want more details, you can explicitly write down the 2 cases:

E(YI)=E(YI|I=0)Pr(I=0)+E(YI|I=1)Pr(I=1)=0+E(Y|I=1)Pr(I=1)=E((a-m)|I=1)E(I)=(a-m)E(I)

3)

Pair up data points from outside to the inside; if there is an odd one out, it's the data point in the middle. For each pair of point (a,b), then the minimum of the total absolute error |x-a|+|x-b| is minimized when x is between a and b. To minimize total absolute error, you can achieve that by minimize error to each pair, and also to the middle point if it exists. This is possible by choosing a point in between the innermost pair, and if there is a middle point, choosing that point.