Let the distance from the starting point to the island be x km.
Speed of the ship sailing out to the island = 15 km/h
Speed of the ship sailing back to the starting point = 10 km/h
We know:
Therefore, the average speed of the ship in the whole journey was 12 km/h.