Wire a 3 way switch with lights at both ends
The last guy used an illegal and unsafe technique to do that.   

Smart switch method


Ground is ground in all cases
Neutral is neutral in all cases
Red is switched-hot in all cases
Black on a branch going to a lamp is always switched hot 


Smart switch on box A switches the switched-hot.  This leaves the black wire in the /3 (RBWg) spare.  Smart switch remote in box B controls switch A using that wire as needed. 

You need to select the smart switch pair carefully.   Such a smart switch would either use the black as an always-hot and communicate via powerline or radio with the master.   Or be battery or inline powered and use the black as a data cable.

Added wires method(s)

If you can switch to /4, you can have 2 messengers (red/black here), neutral (white), and a switched-hot (blue), and it will look like this. 



If you can't get /4 you can just double back with a /2 cable and have the /2 carry switched-hot and its partner neutral for light A.  It could transit through box A, but the hot and neutral would need to be separated from the other wires in the box.  That is because in any cable, currents must  be equal (cancel each other out).