Payload Fall- Need help

Hi, I want to use the ArduPlane code and configure it so that my plane identifies a red circle, then the coordinate of it, flies in that direction and drops a ball. However, I don’t have much knowledge about this. How should I proceed? Which parts of the code do I need to change?

I hope for quick help. Thank you!