(Question is from Ross, A first course in probability) The question states: A bus travels between the two cities A and B, which are 100 miles apart. If the bus has a breakdown, the distance from the breakdown to city A has a uniform distribution over (0, 100). There is a bus service station in city A, in B, and in the center of the route between A and B. It is suggested that it would be more efficient to have the three stations located 25, 50, and 75 miles, respectively, from A.
My initial thought was to look at each scenario and see which ones expected value is smaller.
The first scenario, I wanted to divide into even chunks and then make a probability distribution with a random variable. The crude picture shows what I was thinking.
This is the PDF of the first scenario:
$$ Y = \begin{cases} x & 0 < x \le 25 \newline 50 - x & 25 < x \le 50 \newline x - 50 & 50 < x \le 75 \newline 100 - x & 75 < x \le 100 \end{cases} $$
When I tried the second scenario, I was confused on how to divide up the sections. I saw in the solution that it is divided up like the following PDF:
$$ Z = \begin{cases} 25 - x & x \le 25 \newline x - 25 & 25 < x \le 37.5 \newline 50 - x & 37.5 < x \le 50 \newline x - 50 & 50 < x \le 62.5 \newline 75 - x & 62.5 < x \le 75 \newline x - 75 & 75 < x \le 100 \end{cases} $$
So my question for this post is: why are we interested in the midpoints? I thought all the midpoints that we are interested in where divide the same (uniform). Specifically, why do we start from anywhere that is $x \le 25$, and then we are interested in the point $\frac{50 - 25}{2}$? I may be looking at all this in the wrong way, but would appreciate any clarifications.

The conclusion that the $25,50,75$ locations are better is based on the assumption that you want to minimize the average distance from the breakdown to the repair station.
The distance is linear, which permits shortcuts.
For example, under the assumption that you are first considering the $0,50,100$ locations, you can assume, without loss of generality (by reasons of symmetry) that the breakdown occurs at location $x$, where $0 \leq x \leq 50.$
Further, you are in effect minimizing the following expected values
$$\min\left(|x - 0|, |x - 50|\right).\tag1 $$
In (1) above, the worst location is at $x = 25$, and the best location(s) are $x = 0$ and $x = 50.$ Further, as $x$ changes value from $x= 0$ to (for example) $x = 25$, the change in the distance function is linear.
For example, in the range $0 \leq x \leq 25$, the distance function being measured is $|x - 0|$ rather than (for example) $|x^2 - 0|$. So, you can assume that the typical distance represented as $x$ goes from $0$ to $(25)$ occurs at $x = 12.5.$
So, in effect, with repair locations of $0,50,100$, the best breakdown locations are $0,50,100$, the worst are $25,75$, and the typical breakdown locations are $12.5,37.5,62.5,87.5.$
What this means is that if the repair locations are at $0,50,100$, the average breakdown - repair distance will be $12.5.$
You can arrive at the exact same conclusion, replacing informal intuition with formal calculus, by the following computation:
$$\frac{\int_0^{25} xdx + \int_{25}^{50} (50 - x) dx + \int_{50}^{75} (x - 50)dx + \int_{75}^{100} (100 - x)dx }{\int_0^{100} 1 dx}. \tag2 $$
In (2) above, the denominator is a normalizer so that if the typical integrand is $(1)$ in the numerator, the overall result will produce the average value of $(1)$.
In (2) above, the numerator is split into $4$ categories (i.e. different functions), which determine how the shortest distance between a breakdown and a repair station should be measured, based on the location of the breakdown.
With repair locations at $25,50,75$, you get similar intuition. The best breakdown locations are $25,50,75$, the worst are at $0, 37.5, 62.5, 100.$
For the breakdown locations between $0$ and $25$, the expected breakdown distance is about $12.5$
For breakdown locations between $25$ and $50$, with the worst location being $37.5$, the expected breakdown distance is $6.25$. So, with one of the repair stations moved from $0$ to $25$, and with this repair station only pertinent when $0 \leq x \leq 50$, the effect is that
instead of an overall average breakdown distance of $(12.5)$, for half the interval, the average breakdown distance remains at $(12.5)$ and for half the interval, the average breakdown distance is reduced from $(12.5)$ to $(6.25).$
Again, this type of informal approach is only valid when the change in the function being measured is linear to the change in the value of the variable.