It should not be a problem to use OTG gadget mode on the USB connection to create an ethernet connection to your PC. It is part of the PC to route its internet connection to the RasPi and well known but out of scope here.
Doing tethering with an android cellphone is working out of the box with the default Raspbian image.
So it should be possible to use the ...
You have to configure the RasPi as a simple router. With tethering you should always get an ethernet interface. For example with USB-Tethering you get the interface usb0 out of the box with Raspbian. You can use this interface like any other network interface. I use systemd-networkd to configure networking because it makes things easier.
Just follow to Use ...
"Could anyone please tell me what the problem is and what I should to to solve it?"
Unfortunately NO - you have provided no diagnostic information.
How to set up networking/WiFi describes the normal methods of configuring a network, and may help with diagnostics.
You would need to examine the networking config files and run diagnostics like ip a etc.
What you want to do won't require any additional steps on your raspberry pi devices, and won't need anything proprietary or the gpio pins. The code can be the same as you would use to have two pi's talk over wifi. The only difference will be in what address the two devices use to talk to eachother.
When you have two devices talk over wifi, they are using ...
Well everyone, if you have the same problem I would recommend joining the Blynk community. Their site is a lot like this one to find answers.
Use these commands to turn it on and off.
#to turn it on
# to turn it off
I would not expect immediate results because it takes a few seconds for python to ...