One of the toons will be your primary with the other as your secondary.
You can call them master and slave if you want.

The slave needs a method to assist the master.
You need either a hardware or software option to broadcast your keystrokes to each computer.

The easiest method to assist is via focus.
Both toons would have a macro per toon.
The macro's would be "/focus ToonA" and "/focus ToonB".
These macro's are on the same keybind, so when you press Focus Toon A macro, they both do it.

Both toons will have spells on hotkey 1.
Hotkey 1 will read something like this:

Mage:
/cast [target=focustarget] Frostbolt

Druid:
/cast [target=focustarget] Wrath

You can repeat this for other keybinds with different spells.

There are other assist methods, but this is the easiest.