English is nearly consistent and logical with regard to the position of the genitive apostrophe. If there is no s at the end of the word in its basic form, the apostrophe comes before the genitive s. In other words, your first sentence is correct.
We like each other.
Not:
We like each others.Therefore:
We like each other's names.CB