Note that the altitude of the right triangle on the left = sqrt (5^2 -1^2)= sqrt (25 -1) = sqrt (24)
And ? is the hypotenuse of the right triangle o the right with legs of sqrt (24) and 5
So
? = sqrt [ 5^2 + (sqrt (24))^2 ] = sqrt [ 25 + 24 ] = sqrt [49] = 7