They are congruent triangles,
Ratio of their corresponding sides is 5:25, =1:5 (look for hypotenuse)
so, 5x = 18-x (same manner for variable one)
18 = 6x
x=3
SO, OPTION C IS THE ANSWER.