|MadSci Network: Astronomy|
First, we'd be dead if a star was only 5 million miles away from us. The Sun is 93 million miles away, on average (our orbit is not perfectly circular). But hypothetically, we can tackle this problem. We'll assume a star too small to really be a star...one that won't kill us. Or that our observer posesses sunblock 9 trillion and a refridgerated suit. :) First off, the trip would take (5 million miles)/(the speed of light, 186,000 miles/second) = 26.88 seconds in the Earth's reference frame. So during that time, light would continue to reach us from the star (which had emitted the light 26.88 light seconds away, or 5 million miles as we just calculated). But the light coming from the star as it travelled would be infinitely redshifted (i.e. the photons would have no energy at all), so it would emit no light towards us. Time on the star would also stop relative to our clocks, so it would emit no light at all. Once it stopped (at exactly when we saw the light from the star vanish), we would have to wait for the light to travel 10 million miles to get to us, or 2x26.88 sec = 53.76 seconds. Almost a minute of dark. Then we would see the star, suddenly shining again from 10 million miles away. It would have 1/4 the original intensity, since it's twice as far away and the number of photons per square unit area varies as 1/r^2 where r is the distance away...which has doubled. But the problem with that is, we'd never survive that long. To accelerate any object with mass to the speed of light takes infinite energy. To do so instantaneously would create an infinitely strong gravitational shock wave, which also travels (in theory) at the speed of light. So exactly as the star's light went out, the observer on Earth would be infinitely pulverized by the gravitational shock wave, which would reach us just as the last of the light did. But I'll assume that gravitational waves are outside the scope of the question and you're only concerned about the light from the star.
Try the links in the MadSci Library for more information on Astronomy.