Notice they are all right triangles. You will need Pythagorean theorem, which is a² + b² = c²
If you write down all the "equations" you can find, it is the following:
y² + 4² = x²
5² + y² = z²
x² + z² = 9²
Substitute them into one equation:
y² = x² - 4²
z² = 5² + (x² - 4²) Notice that the y² is replaced with what you found above
x² + (5² + x² - 4²) = 9² Notice that the z² is replaced with what's above
Now that it is just one line with one variable, you should be able to find value of x easily.
The answer is 6 if my calculations are correct.