A railway line is divided into $10$ sections by the stations $A, B, C, D, E, F, G, H, I, J$ and $K$. The distance between $A$ and $K$ is $56$ km. A trip along two successive sections never exceeds $12$ km. A trip along three successive sections is at least $17$ km. What is the distance between $B$ and $G$?
I have no idea how to solve this question. I thought about taking the distance between each set of successive stations as a variable, but this gets too messy. And taking ${56\over10}=5.6$ doesn't work as well. The inequalities look like they're important, but I can not make use of them anywhere.
Please help.

Note that the the distance between $A$ and $D$ is at least $17$. On the other side the distance between $B$ and $D$ is at most $12$. This the distance between $A$ and $B$ is at least $5$. With similar reasoning we get that the length of each section is at least $5$.
So we get that the distance between $G$ and $K$ is at least $22$ (at least $17$ for three sections and at least $5$ for the final one). Thus the distance from $A$ to $G$ is at most $56-22=34$. On the other side there are $6$ sections between $A$ and $G$, so the distance is at least $34$ (we have two times three sections). Thus we conclude that the distance between $A$ and $G$ is $34$.
On the other side the distance between $B$ and $K$ is at least $51$, as it consists of nine sections. Thus the distance $AB$ is at most $56-51=5$. From this and the first paragraph we conclude that $AB=5$ and finally
$$BG = AG - AB = 34-5=29$$