2 instanced of ESP8266Ping
With that library... you can't. All the code is in one big monolithic .h file. As you well know by now that is a big no-no. The author should be given a big slap on the wrists.
The closest you could do without re-writing the whole library is to just copy the class definition from the outer .h file and create an extern to the existing object - maybe make your own copy of the ESP8266Ping.h file without the #include &quot;ESP8266Ping.impl.h&quot; and PingClass Ping; (the latter of which you change to an extern).