The distance of the ship from the shore is 1020m
Step-by-step explanation:
Given:
Speed, s = 340 m/s
Time, t = 10s
Distance, x = ?
The sound is going to have to go to shore, then come back. 
 
The total round-trip distance is 
 D = speed X time
 D = (340 m/s) * (6.0 s) 
 D = 2,040 m 
 
But as previously stated, the sound had to get there, then come back. So the actual ship-to-shore distance is only half that. 
 
x = D/2 
 

 
Therefore, the distance of the ship from the shore is 1020m