I am going to try to help, but I’m not 100% sure that I understand the problem. It seems to me that you have two power supplies that can be switched on independently (P1 and P2). If either P1 or P2 are on, then you also want to have an extra supply P3 automatically switch on, is that correct?
If so, you need to do two things. The first thing to do is to determine whether one of the supplies is on. To do this, you can make an OR gate using two diodes and any positive voltage rail on P1 and P2, kind of like the schematic in this question:
https://electronics.stackexchange.com/questions/130932/switching-between-battery-and-usb-using-diode-or-logic . This is what wraper is talking about.
Next, you can input this to a small circuit which will set the green wire on P3 to ground. Something like an SPDT relay as mentioned earlier would work fine, but you could also use a transistor. There is indeed a relay on that PCB you posted. For an SPDT relay, you would connect the diode or gate to the coil, connect 0V to the normally open (NO) and connect the common to the green wire on P3. Some more info on relays here:
https://www.electroschematics.com/9598/spdt-relay-switch/