Explanation:
since it is the midsegment, all involved and related line segments follow the 1/2 factor.
so, the length of the midsegment is precisely in the middle between the lengths of the top and bottom lines.
in the first drawing
22 = x + (x - 10)
22 = x + x - 10
32 = x + x = 2x
x = 16
in the second drawing
x = 15 + (15 - 8) = 15 + 7 = 22