Can you put a dimmer on a two way switch?
Replacing a Toggle Light Switch With a Rocker Switch
How to Wire a Double Switch (with Pictures)
As shown below, rocker switches have 3 electrical connections.
Take the white wire leading to the second box and mark its end black too.
The white wire coming straight from the power source goes uninterrupted into the light fixture while the hot wires are routed through the switches.
This extra wire provides another connection between the switches so that either switch is capable of sending power to the light.
A double-switch allows you to operate two lights or appliances from the same location.
If you are trying to separate two lights that use the same wiring, as opposed to two already separate sources, you will likely need a trained electrician.