Here, 
We know beat frequency is the difference of the frequencies of the sources. When unknown source is sounded with known source of frequency 250 Hz, it gives 4 beats/s. It means the frequency of unknown source may be 254 Hz or 246 Hz. Now second harmonic of the source of unknown frequency gives five beats per second, when sounded with a source of frequency 513 Hz. It means the frequency of unknown source may be 518 Hz or 508 Hz. As 2518=259 Hz and 2508=254 Hz Hence unknown frequency is 254 Hz.