A and B are two sources generating sound waves. A listener is situated at C. The frequency of the source at A is 500 Hz. A, now, moves towards C with a speed $4\mathrm{~m/s}$. The number of beats heard at C is 6. When A moves away from C with speed $4\mathrm{~m/s}$, the number of beats heard at C is 18. The speed of sound is $340\mathrm{~m/s}$. The frequency of the source at B is:\\
(1) 500 Hz\\
(2) 506 Hz\\
(3) 512 Hz\\
(4) 494 Hz