Radar is ineffective underwater because the radio waves are absorbed by the water. That is why there's no radar in use on submarines.
Sonar is not a valid solution here because it annoys the whales. Or at least high-power sonar, as used by the military, does. It would defeat the point.
Sonar is the solution; passive sonar using numerous hydrophones to chart the bearing of the whale. How that bearing changes over time allows you to deduce if you're on a collision course. This is tech developed by the military.