x=3
Use the pythagorean theorem:
a^2 + b^2 = c^2
4^2 + x^2 = 5^2
16 + x^2 = 25
x^2 = 25-16
x^2 = 9
√x^2 = √9
x = 3