After a long meditation on Shiva at Kailash mountain, the demon Khara received three lingas from him, which he should worship equally. He took two of them in each hand, and hung the third around his neck.
On the way home to Kerala he got tired and lay down to rest. The two lingas in his hands are the Vaikom Shiva temple and the Ettumanur Shiva temple. The linga that he wore around his neck is the Kaduthuruthi Shiva temple.
Since the distance of the neck to the hands is the same, the distance of the three temples is also the same.