One of the limiting factors would be how far the Sonobuoy can transmit data to the processing equipment on the aircraft. To process data from a sonobuoy field the AC would have to fly at an altitude to receive data from all the buoy's.
An article I just came across says that a Sonobuoy from as high as 30,000 feet.
https://dosits.org/galleries/technology-gallery/locating-objects-by-listening-to-their-sounds/difar/
Here is another article on Sonobuoy's:
https://www.militaryaerospace.com/sensors/article/14283490/antisubmarine-warfare-asw-sonobuoys-underwater-sounds
Here is an article on how the whole process for detecting a sub works:
https://nps.edu/web/slamr/-/disrupting-anti-submarine-warfare-with-autonomous-systems
The lower the AC is to the water the easier it is for the sub to hear the aircraft.
Once a contact has been acquired and the general location of the contact is known only then the aircraft drops down to a lower altitude to get a precise location of the contact wit MAD.
I haven't been able to find out the transmission range to the aircraft of the buoy. That information may not be published for a good reason.
To detect a surface ship you would first look for any electronic emissions. The electronic emissions will be detected long before the ship will be able to detect the aircraft.
Since the noise a surface ship makes is trapped above the thermal layer of the ocean it can travel long distances. The only way to try an localize a surface contact is to use Time motion analysis. A good example for TMA was used in the Hunt for Red October by Sonar Technician Jonsey when he plotted the course of the weird sound. He was able to figure out what the course was of the Red October.
The one unknown factor is what can Harpoon do and can't do. That is the question for TE to try and answer.