What's the best external flash for the Nikon 5200 using a AF-S Nikkor 18-300mm lens? I want to make sure the flash covers the length of the lens.
On a crop body, just about any external flash should be able to cover 27mm or so effective focal length. Even if your flash didn't quite cover it, a diffuser can easily spread the light out sufficiently. The 300mm is going to just be a subset of that field of view.
That said, this is without distance factoring in. If you want to be able to cover a person standing at a distance that takes a 300mm lens to fill the frame, it is a vastly different question. Without a distance to factor in, it isn't possible to answer how powerful a flash needs to be.
The number you are interested in is known as the guide number. The guide number divided by the aperture value gives you the distance at which the flash can give a standard exposure for whatever ISO the guide number is for (typically 100 if not otherwise specified).
There is no flashes with focal length more than 200mm at the 'long' end. Nikon SB-900 has 200mm.
In your case you'd need 450mm (as 300mm on a cropped body is equivalent to 450mm of effective focal length). I'd bet there is no Nikon flashes with such narrow beam and there is no and will not be any third-party ones.
But generally you don't need the flash covering all this focal lengths range. If you'd shoot at the focal length more than you flash can support you will just waist some extra light for the area your lens not covering. So it's not a big deal. Even at the 'short' end of the lens it's not a big problem to have not sufficient flash coverage (light beam of your flash is narrower that the lens coverage) as you will get artistic effect of separation your subject from background.
I'd stuck with SB-600...SB-900 or even Yongnuo (depending on your budget) and forget about the flash head zoom range.
The SB910 can go out to 200mm and it also has the ability to adjust the spread of the flash. So you can make the spread normal, wider or more concentrated. With the concentrated beam you should get better results at 300mm.
The SB600 is just not going to be powerful enough, especially as it only goes out to 85mm (from memory of mine at home).
The SB910 is a great flash unit. Expensive, but very very good.
Even if the flash were to reach that far (which others have indicated doesn't happen), the long lens body would almost certainly lead to bad shadows where it cuts off the beam from the flash, especially at shorter focal lengths where that mean is more dispersed.
So for lenses like that, an off camera light source is highly recommended, and then you can just place it where needed and trigger through cables from the camera.
AFAIK, if you are using a long lens, flashes are based more on the distance-to-subject than the focal length itself. This is indicated by the guide number of the flash.
At the wide end, most flashes (that I know of) will cover a 24mm focal length, and my 430ex has a little extendible filter for the flash that widens that to 14mm.
So yeah - if you're shooting at 300mm and your subject is far enough away, the flash won't make a difference anyway...