hope, i can try: if you are using Air circuit brakers, try to use the U/V, under voltage, to NO/NC configuration to actuate the next braker, if you are not using any U/V, use two contactos, in both the phases to know which source is available, & then switch the ckt. , do not forget to put the NC/NO, & NO/NC interlock to avoid fiashover, or phase short-ckt.
Bhaskar