On a right triangle, to find one missing side you can use this equation
a^2 + b^2 = c^2
a and b are the sides next to the right angle, and c is the hypotenuse (side not connected to right angle).
You first need to find the length of the dotted line before finding x. This is because to be able to use the above formula, you have to know the length of two out of three of the sides.
To solve the length of the dotted line, note that it also makes a triangle with the 5 unit line and the 5 √5 unit line. You can plug these numbers into the formula.
(5)^2+b^2=(5 √5)^2
25+b^2=125
b^2=100
b=10
Now that you know the length of the dotted line is 10 units, you can now solve for x
(20)^2+(10)^2=x^2
400+100=x^2
500=x^2
x= √500, which equals 22.361