Automation - Stealing a signal from a circuit
It quite probable the the switch can't simply be connected to both circuits without them interacting in some undesired way. (this may involve smoke)
There's a couple of options
1: replace the switch with a two-pole switch (a two pole switch contains two separated switches that act in unison) and wire one pole of the switch to each circuit
2: keep the switch but use it to operate a two pole relay (a relay is an electrically operated switch)  it may be possible to take the power to operate the switch-relay circuit from one of the devices
3: add an isolated current sensor in series with the switch anuse that to detect switch closure and the current sensor operate a relay etc... this requires that the switch switches sufficient curren to operate the current sensor.
then theres's some options:
use two single-pole relays instead of a two pole relay.
find a way to use the switch in one circuit and have it also switch the relay (then only a single pole relay is needed)
use opto-isolators instead of relays: if the signals are small and switch resistance is not a problem this may work, opto-isolators are cheaper. smaller. and use less power, but their output capacity is much less that that of a relay.