A railroad track connects a station A to another K passing successively through stations from A to K A railroad track connects a station A to another K passing successively through stations A B C D E F G H I J (it is assumed that these eleven stations are aligned).The distance between station A and K is 56 km.The length of a route that connects 3 successive stations never exceeds 12km.The length of a route that connects 4 successive stations is at least 17km. What is the distance between stations B and G?
My take:
First:  $AB+BC+CD+DE+EF+FG+GH+HI+IJ+JK=56$
I put: $d=BC+CD+DE+EF+FG$
Then since the length of three successive stations never exceeds 12 km we get:
$AB+d< 12\times 3=36$ (1)
Following from the fact that the length of four successive stations is at least 17km:
$AB+d> 17\times 2=34$ (2)
From (1) and (2) I get:
$34<AB+d<36$
Finding a bound for AB:
$AB=56-(BC+CD+DE+EF+FG+GH+HI+IJ+JK)$
$BC+CD+DE+EF+FG+GH+HI+IJ+JK> 17 \times 3=51$
$-(BC+CD+DE+EF+FG+GH+HI+IJ+JK)<-51$
So: $AB<56-51$
$AB<5$
SN:this is how far i went , any hint or help would be greatly appreciated , if there is any mistake on my work , please feel free to correct me.
 A: The main thing to note is that from the two constraints, one limits the distances from being too small and the other limits them from being too large. So what we expect is that, coupled with the total sum at 56, we should be able to find a narrow interval for the required distance. In this case it even happens to be an exact value.
I will assume that for a given station the corresponding lowercase letter denotes the distance from it to the next station, for example $AB = a$, $BC = b$ and so on, 10 total distances between the 11 stations.
Just as you have done already, but with my notation, we have $56 = a + (b + c + d) + (e + f + g) + (h + i + j) \geq a + 3 \cdot 17 = a + 51$, so $a \leq 5$
But from $a + b + c \geq 17$ and $b + c \leq 12$ we can obtain $a \geq 5$. So we have $a = 5$.
But then it also means that $(b + c + d) + (e + f + g) + (h + i + j) = 51$, which based on the given constraints means that each of the three sums must be exactly 17. So we can conclude $b + c + d + e + f + g = 34$. To get the answer we only need to find the value of $g$.
We have $e + f + g = 17$. From $e + f \leq 12$. Now, on one hand we have $a + (b + c + d) + (e + f + g) = 5 + 17 + 17 = 39$. If we group differenty, $(a + b + c) + (d + e + f) + g \geq 17 + 17 + g$, so $g \leq 5$, so we must have $g = 5$. Notice also how this is very similar to how we got $a = 5$.
Putting it all together, the final answer should be $34 - 5 = 29$.
