I know amplitudes cancel (destructive) or combine (constructive) as per image below:
(Source)
But how do frequencies cancel out or combine?
For some context: a question from my textbook
A song is played off a CD. One set of speakers is playing the note at $512$ Hz, but the presence of the second set of speakres causes beats of frequency $4$ Hz to be heard at a point equidistanct from the four speakers. The possible frequencies being playing by the addition speakers are:
Answer: $508$ and $516$ Hz.
I am not sure if I understand the concept correctly, but amplitudes canceling out makes sense as its a matter of e.g. a negative amplitude cancelling out an equal magnitude positive amplitude and combining into one wave (or variations of this depending on the magnitude of each wave).
So to me this seems like a matter of distance/displacements (in the form of Amplitude, or distance above or below the centerline) canceling out.
But I don't see how this works for frequencies.
Frequency is waves/second. So wouldn't playing a $512$ Hz frequency and a $516$ Hz frequency just cause both of them to be heard separately, rather than cancel out to $4$ Hz?
I don't understand how "speeds" can cancel out.