Need help ASAP please for solving this problem did I solve for x did I get the correct answer if I did not can someone give me the correct answer please need ASAP

Use the right triangle altitude theorem.
30/x = x/24
x^2 = 30 * 24
x^2 = 2 * 5 * 3 * 8 * 3
x^2 = 16 * 9 * 5
x = 12sqrt(5)
Answer: D.