The wavelength is the distance between two waves, and the speed of light is how fast each of these x-ray photons are going. So if we want to know how many waves go by in a second, the frequency, we have to know how many waves fit in the distance a photon will go at the speed of light in one second. So if we take the speed of the photon in meters per second and divide it by the wavelength (in meters) we will get the number of waves that will go by in one second, or its frequency (Hz=waves/second).
2.998 x 108 m/s / 5 x 10-9 m/wave = 0.5996 x 1017 Hz (waves/second)
Multiple choice answer D