If the length of one base of a trapezoid is 5, the length of the other base is 2x + 7, and the length of the midsegment is 6x – 24, what is the value of x? Show equations and all work that leads to your answer.