So since m is the mid point, the distances on both sides are the same…sooo:

2x+35 = 5x-22.

Thus rearrange for x:

57 = 3x

x = 57/3

You also know that the total length is 2x+35) + (5x-22)

Or 2(2x+35)

Or 2(5x-22)

(I guess the question is asking you for total length)