Since this is a 30-60-90 triangle, we know the trigonometic relations of this triangles. Since this is a 30-60-90 triangle, the angle between the square root of 5 and x is 30º. We know that we can construct the trigonometric relations in a right triangle, and we also know the actual value of the trigonometic function for 30º.
In a right triangle, the cosine of an angle is given by the ratio between the adjacent leg by the hypotenuse. We also know that the cosine of 30º is the square root of 3 divided by 2. Then, we can construct the following equation
Solving for x, we have
Since we want to rationalize this answer, we just need to multiply both the numerator and the denominator by the square root of 3.