How to calculate the Doppler effect on a wave reflection when both the source and the listener are moving? Two submarines are moving towards each other.
The first submarine emits a wave towards the second. 
The wave bounces off the second submarine and reaches the first submarine again.
How should one calculate the frequency of the reflected wave? 
The main question here is what speeds should we consider for the reflection when calculating the Doppler effect. From what I understand, if the second submarine is moving when the reflection is happening, so both the observer and the source are still moving towards each other, hence:
f' = f * [ (v-o) / (v-s) ]
Where o is the speed of the observer (first sub) and s is the speed of the source (second sub).
But here's the thing, when discussing this in class, my physics teacher mentioned that the speed of the source (second sub) should be zero, because we already considered its speed when calculating the frequency of the wave before the reflection, in that case the speed of the observer. 
And I really couldn't understand this. 
Why shouldn't I consider anymore the speed of the source when reflecting a Doppler affected wave?
 A: I recommend breaking this into two smaller problems by inserting a "stationary observer" between the two subs. Denote the frequency of the signal that leaves sub 1 as $f_1$, observed at the stationary point $f_s$, observed by the (moving) sub 2 as $f_2$. Upon reflection, the frequency of the signal is unchanged (in the frame of reference of sub 2), but the signal received at the intermediate point $f_s'$ is obviously different. Now consider $f_s'$ the stationary transmitter - what is the frequency $F_1'$ that will be observed by the first sub?
Each of the steps of the above is something you know how to do. Let me step you through it: assuming velocity of sub 1 towards the stationary observer is $v_1$, velocity of sub 2 towards the observer is $v_2$, and speed of sound in water is c:
$$f_s = \frac{c}{c-v_1} f_1$$
When that signal is received by sub 2, it sees
$$f_2 = \frac{c+v_2}{c} f_s = \frac{c+v_2}{c-v_1}f_1$$
Now that observed frequency, upon reflection, becomes a source of sound moving towards SO with velocity $v_2$, so the reflected frequency seen by the stationary observer is
$$f_s' = \frac{c}{c-v_2}f_2$$
and finally, this frequency is observed by sub 1 moving towards the SO:
$$f_1' = \frac{c+v_1}{c}f_s' = \frac{(c+v_1)(c+v_2)}{(c-v_1)(c-v_2)} f_1$$
The velocity of both subs relative to the medium (water) is what matters - not their relative velocity. This is because the velocity of the sound is fixed relative to the medium. Note that the answer would be slightly different if you had light waves in vacuum, whose speed is the same regardless of the frame of reference.
If you look at this Khan academy video, around 3:30 you get the same principle explained (the reflecting object becomes a source that re-radiates at the frequency it "hears").
A: The Doppler effect just depends on the relative velocity between the two objects. So we could assume the 'listener' is at rest while the 'reflector' is moving at a speed of v + v' where v' is velocity of 'listener'.
