You can fetch all flights within a given time interval from the Opensky API and then work with estDepartureAirport and estArrivalAirport, see the docs.
However, "est" stands for estimated. For more reliable results, you might have to fetch more data from the Opensky API and build the pairs yourself:
Fetch the departures at A
Track the flight by it's ...
the best way to find this information in my opinion is to look at the airports schedule. lets say you have point A as JFK you can use this link (link below) to see its departures and arrivals. then you can just search all the aircraft to point B by filtering in the departure section.
hope this helps
link to JFK https://www.jfkairport.com/flight-tracker?...