The black hot wire in the electrical box above is connected at the other end to the black line wire and gets connected to the black or red screw on the 3 way switch. Black wire power or hot wire white wire neutral bare copper ground.

Handymanwire Wiring A 3 Way Or 4 Way Switch
3 way switch wiring red black white. This is a typical wiring setup for a 3 way light switch with black white red and ground wires. The different screw gets the black wire that comes from the cable with the black white and bare wires. If that is the case pigtail the blacks from the two 2 wires together and place the pigtail on the black or common screw of the 3 way switch. When wiring a 3 way switch circuit all we want to do is to control the black wire hot wire to turn on and off the load from 2 different locations. Connect the black wire to the other brass screw. Take the red from the three wire and put it under one.
The red wire is the other traveler. If you dont have a ground wire leave the green screw unconnected. The bare wires attach to a little bit of wire that connects to the green screw on the switch. Wiring a three way switch. The travelers get connected to the two brass screw terminals on the 3 way switch. The two same screws get the black and red wires from the other cable.
The cable has a black wire which connects directly to the circuit and a red wire which connects to the switch. The white wire has been taped with blue electrical tape to show that it is not a neutral conductor but a traveler. The ground wire also connects to the switch but the white wire gets spliced to the circuit neutral wire and bypasses the switch. The white wires connect to each other and nothing else. The same wiring method is also used for two way switch wiring. If you have a ground wire connect the ground wire to the green screw.
Red wire power or hot wire black wire power or hot wire white wire neutral bare copper ground. The standard way to power a split tab outlet is to run a three conductor cable to a wall switch.