Hi Abraham,
These two triangles are similar because all three pairs of corresponding angles are congruent. Because they are similar, we can multiply the lengths of the sides of triangle ABE by a scale factor to obtain the lengths of the sides of triangle ACD. Since BE is the midsegment, we know the length of AD is twice the length of AE and the length of AC is twice the length of AB.
This means that the scale factor from the smaller triangle to the larger one is 2. So if BE is 20, CD must be 40, and therefore the value of x must be 35. I hope this helped!
Kevin
