The first imperfect expresses the condition, the second the result. This is not an ordinary “where?” question, as shown by the jussive forms.
Book example: أَيْنَ تَجْلِسْ أَجْلِسْ.
Wherever you sit, I will sit.
Ayna: indeclinable jussive conditional word in adverbial position; tajlis: jussive condition with implicit “you”; ajlis: jussive result with implicit “I”.