SV middle line of trapezoid, so
[tex] \frac{40 + x}{2} = 29 \\ 40 + x = 58 \\ x = 18[/tex]
Answer: QR=18