The length of x would be 2 units. You already know that 40 degrees equals eight cm. With that you can break the equation into parts.
If 40 degrees equals eight, then 20 degrees would equal four units. Using that hypothesis, you can then infer that x=2 units.
Hope that helped.