we work this out by using pythagorus theorem:
a^2+b^2=c^2 where C is the hypotenuse/ in this case the missing length
substitute the lengths for a and b so:
12^2 + 35^2 = C^2
now we work out 12^2 and 35^2 which is 144 and 1225
now we put it back in the equation
144 + 1225 = c^2
so c^2 = 1369
but we want c not c^2 so we square root 1369 which is 37
The missing length is 37
(by the way I just used C instead of X like in the image)