Submarine Speed Detection A submarine can use sonar (sound traveling through water) to determine its distance from other objects. The time between the emission of a sound pulse (a “ping”) and the detection of its echo can be used to determine such distances.
Alternatively, by measuring the time between successive echo receptions of a regularly timed set of pings, the submarine’s speed may be determined by comparing the time between echoes to the time between pings. 
Assume you are the sonar operator in a submarine traveling at a constant velocity underwater. Your boat is in the eastern Mediterranean Sea, where the speed of sound is known to be 1522 m/s. If you send out pings every 2.00 s, and your apparatus receives echoes reflected from an undersea cliff every 1.98 s, how fast is your submarine traveling?
Here's my solution: note it is wrong
Let the submarine be at origin and the cliff be at some point on x axis.
Time taken for the ping to reach the cliff= 2 sec.
In that time the submarine moves 2v distance on x axis (v-velocity of submarine)
Time taken for the echo to reach the submarine=1.98 sec.
In that time the submarine moves 1.98v distance further.
Distance of cliff from origin =1522*2 m
Distance of cliff from submarines final position = 1522*1.98 m
Thus, 2v + 1.98v + 1522*1.98 = 1522*2
V= 7.65 m/s
But the answer shud be 15(approx.)
I tried solving it using Doppler effect, but the answer comes wrong again.
 A: The round trip time of the ping is unknown; but we do know that the difference in round trip time between sub stationary and sub moving is 0.02 seconds.
Let us write $D$ for the distance to the cliff when you send the ping; if you are traveling at a speed $v$, and the speed of sound in water is $c$, then we can write down the round trip time as follows (outbound distance is $D$, return distance is $D - v\cdot t$:
$$t = \frac{D}{c} + \frac{D-v\cdot t}{c}$$
Now we know that when the sub is still, $\frac{2D}{c} = t_0$. And while we don't know either $t$ or $t_0$, we do know that they differ by 1%: if the distance to the cliff is such that $n$ pings are "under way" when the first ping returns, we know that ping has arrived 0.02 n seconds earlier than it would have if the sub had been stationary. We know therefore that $\frac{t}{t_0} = 0.99$.
A bit of manipulation of the above gives
$$\begin{align}t &= \frac{2D}{c} - \frac{v}{c}\cdot t\\
t &= t_0 - \frac{v}{c}\cdot t\\
v &= (t_0 - t)\;\frac{c}{t}\\
v &= \left( \frac{t_0}{t}-1\right)\cdot c\\
&= \left( \frac{2.00\;s}{1.98\;s}-1\right)\cdot 1522\;\mathrm{m/s}\\
&= 15.4\;\mathrm{m/s}\end{align}$$
Note that this answer is slightly different than just 0.01 * 1522. With the precision of the numbers given in the question, the difference is just significant (15.4 s 15.2 m/s).
A: Your error is that you assume it takes 2.00s seconds for the ping to reach the cliff and an additional 1.98s to return. Without knowing the distance to the cliff, we can't qualify that assumption. Besides that, the only thing we need for the calculation is the difference in period of the outgoing and incoming pings. With a single ping you can calculate the distance - count the time and multiply by the speed of sound - but in the middle of a series of pings you don't know which echo came from which ping.
Calculating how fast you're moving is fairly straightforward. You know the difference in period caused by your motion is 0.01s per second ((2.00s-1.98s)/2.00s) which means that for each second between the ping and the echo, the sound has to travel 0.01x less distance to make the round trip. It doesn't matter how far away the echoing cliff is, the proportion will be the same, since the longer it takes the sound to get there, the more distance you close in the meantime. Now that you know the proportion by which you are reducing the travel time of the ping, you can combine that with the known speed of the ping to derive how fast you are going:
$0.01s/s\ *\ 1522m/s\ =\ 15.2m/s$
Which you've already stated is the correct answer to the problem.
