If Bailey is right below the baloon, their relative position would be given by the following figure:
As you can see, a rectangle triangle is now formed, then we can use the Pythagorean theorem to find the length of the base of the triangle (distance between Amber and Bailey), like this:
![\begin{gathered} b=\sqrt[]{50^2-40^2} \\ b=\sqrt[]{2500-1600} \\ b=\sqrt[]{900} \\ b=30 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/7slnq39imdik45le8bn6pdkqwme5446if9.png)
Then, they have to stand 30 feet apart so that bailey is right below the balloon.