let $AB=CD=a,AD=CB=b,AM=x$ then by pythagorian theorem we have :
$x^2+a^2=(15)^2,x^2+b^2=(20)^2,x^2+a^2+b^2=(24)^2\implies x^2=(15)^2+(20)^2-(24)^2=49\implies AM=7$
Use the British Flag Theorem.
What sunken rock said was true, $M$ may be any point in space. $AM$ does not have to be perpendicular to plane $ABC$.
$$MA^2+MC^2=MB^2+MD^2\implies MA=\boxed7$$