The midsegment of a trapezoid is parallel to each base and its measure is one half the sum of the lengths of the bases.
Using the theorem, we can write the following equation.
PM= 1/2 ( TS+ QR)
Let's substitute the given lengths of the segments into the equation.
12=1/2 ( 4x+ 16)
By performing inverse operations, we can solve this equation for x.