Okay so make sure you know this, 1000 meters = 1km so basically 2km is 2000m so you divide that by 25, 2000/25= 80, so you would need to swim 80 lengths If it's from side to side. If they are asking you the length of the whole pool, it would be 25 to one side and another 25 back so is the whole pool. that means that the pool is 25 meters long but if you swim towards and then you swim back it would be 50 meters so the answer would be 40 because you divide it by 2.
Hope it helps :)