We have that
h/sin(theta) = 20/ cos(theta) → h = 20 tan(theta)
And
h/cos(theta) = 9/ sin(theta) → h = 9cot(theta)
So
20tan(theta) = 9cot (theta) →
tan^2(theta) = 9/20
tan(theta) = (2/3)√5
Therefore
tan-1( (2/3)√5) = theta = about 56.15°
So the shorter side is given by
cos(56.15) = 9 / S where S is the shorter side
S = 9/cos(56.15) = 16.155
And the longer side is given by
cos(90- 56.15) = 20/ L
L = 20/cos(33.84) = 24.08
Check
√[16.155^2 + 24.08^2] ≈ 29
