Draw a diagram. You want to see how far the horizon is from height h. Draw a radius extended by h. Draw the tangent to the circle from that extended radius. Draw a radius to the tangent. Now you have a right triangle with one leg=r, the hypotenuse=r+h.
If the distance to the horizon is d, then
r^2 + d^2 = (r+h)^2
4000^2 + d^2 = 4005^2
d^2 = 16040025 - 16000000 = 40025
d = 200 mi.
If r is very large compared to h, then we have
(r+h)^2 = r^2 + 2rh + h^2
but h^2 is negligible.
so, d^2 = 2rh = 2*4000*5 = 40000
d = 200