The correct answer is: C. you are in London.
The question is about a friend who is going to visit London. The speaker wants to know where the friend is going to stay. The speaker asks, “Where are you going to stay when you are in London?” This is the only option that makes sense in the context of the question.
Option A, “you are going to London,” is not correct because the speaker is asking about the friend’s current plans, not about the speaker’s own plans.
Option B, “you were in London,” is not correct because the speaker is asking about the friend’s current plans, not about the friend’s past plans.
Option D, “you have been in London,” is not correct because the speaker is asking about the friend’s current plans, not about the friend’s past experiences.