The physics
A box let go from a plane starts with the plane's velocity. After that, only gravity acts. Gravity only pulls down.
x = ux t y = h + uy t − ½ g t²
From level flight (uy = 0), the fall time is t = √(2h / g), whatever the plane's speed.
For a moving target, use the velocity relative to the target.
distance = (vplane − vtarget) × t