The easiest way to tell which black wire is hot is by using a circuit tester. If you don't have a circuit tester, you can also use a multimeter to test for continuity. Simply touch one lead of the multimeter to each of the black wires in turn and see which one gives you a reading on the multimeter.