To ask "how are you" to someone you don't know in French, the appropriate phrase would be "Comment allez-vous?" This is the formal way of asking, suitable for someone you are not familiar with.
The other phrases you mentioned have different meanings:
- "Comment ça va?" - This is a more informal way of asking "how are you?" typically used among friends or people of the same age group.
- "Vous habitez à Paris." - This means "Do you live in Paris?" and is not a greeting.
- "Comment vous appelez-vous?" - This means "What is your name?" and is a way to ask for someone's name, not their well-being.
So, the correct response for saying "how are you" to someone you don't know is indeed "Comment allez-vous?"