b) This is simply from the fact that the median, , is a point along the distribution of , , so that (i.e. the middle value of the distribution) - so then just plug in to obtain and this verifies that it's the median.

c) This is because we have but we can split it so that and we know that so subtracting this from both sides yields the equality shown in the mark scheme.

d)

We want to preferably find because then our intervals of interest are strictly within the interval so we only need to deal with a single function (*). (Also since q is the upper quartile, we know that P(X>q) = 0.25 straight away without any work)

(*) If we didn't change our interval, then obviously we would need to deal with and this isn't as bad since we know without thinking that the first one must 1/2, but in general this doesn't happen very often and you'd have to deal with two integrals instead of just one for a given piecewise pdf just as you have here.