If the similar figures shown below are right triangles, what is the value of x?
