The 5-mile rule has presented a lot of confusion over the last few years.
If you’re operating under Part 107 regulations as an FAA-certified drone pilot, remember that it doesn’t matter how close or how far you are from an airport — what matters is if you’re in controlled or uncontrolled airspace.
If you’re in Class G uncontrolled airspace, you can operate right up next to an airport without any additional notification or authorization. Of course, you’re not allowed to impede any existing manned aircraft operations, so depending on the nature of the flight and the traffic volume/operations at the local airport, heliport, etc. you might want to do some additional research or at least reach out as a nice best practice to let them know what you’re up to.
Always remain vigilant and yield to manned aircraft.
And in this case, it might be helpful to use a visual observer while flying.