Offing is an old nautical term ( 17th century) meaning the more distant part of the sea as seen from the shore and generally beyond anchoring ground.Explanation of terms used in seamanship. The Maritime History Virtual Archives.
A ship "in the offing" is often approaching port, hence the phrase is used figuratively to mean 'about to happen'. The origins of the phrase probably come from the days of the Age of Sail when people would scan the offing for ships returning to shore.
To keep an offing is to keep a safe distance away from the coast often because of navigational dangers, fog and other hazards.The Maritime & Shipping Dictionary. AZA Group.
References
See Also Glossary of nautical terms Horizon International Regulations for Preventing Collisions at Sea Sail Sailing