The total length of the first and the second sections of a hiking track is 24km. Martin has walked 2/3 of the first section, while Herman has walked 5/9 of the second section. If Martin has walked 1/2km less than Herman.

Find the length of each section of the hiking track.

If the lengths are a and b, then we know that

a+b = 24
2/3 a = 5/9 b - 1/2
Now just solve for a and b. It might be easier to write this as

a+b = 24
12a - 10b = -9