When two waves (sound waves, in this case) are similar frequencies, but not matching, they'll partially cancel each other out, but not fully. The difference between the frequencies is however many "beats" you get per second. Therefore, the closer the frequencies, the slower the "beat", and the farther away, the more "beats" you'll have.
If you can count how many beats per second you have, that will give you the difference in frequencies.