All of your shapes are formed like this: pick a triangle, and connect the middle points of two sides. In all those cases, you have that the inner triangle is similar to the whole triangle, with scale factor 1/2.
Look at the attached picture. ABC is similar to CDE, and since the correspondent sides are one the double of the other (AC=2DC and BC=2CE), we deduce that AB=2DE.
So, in your exercises, you'll always have to setup this equation: the inner segment is half of the base. For example, in the first exercise, you have
![x-4=(17)/(2) \iff 2x-8=17 \iff 2x=25 \iff x=12.5](https://img.qammunity.org/2021/formulas/mathematics/high-school/fgz9dqd5d5orvf0juj5lt0kkp90lp81f29.png)
Work similarly for the second and third triangle and you'll be done