The situation is equivalent to two sources giving beats. First is the whistle of the boy and the second is wall.
fb=fs−fs′
4=f(340340−1)−f(340340+1)
Or 4=f(1−1340)−f(1+1340) on applying binomial approximation,
4=f(1+1340)−f(1−1340)=f170 or f=680 Hz