In indirect speech, is it correct to write

Joe asked Nelson when did Gabriel reach home or when Gabriel had reached home. Please explain

Yes, and here's how to see this:

Direct question (or direct address):
Joe asked, "Nelson, when did Gabriel reach home?" (past, past)

Indirect question:
Joe asked Nelson when Gabriel had reached home. (past, past perfect)

http://www.englishtenses.com/reported_speech

Indirect questions: http://grammar.ccc.commnet.edu/grammar/marks/question.htm#indirect

Indirect speech: http://staff.washington.edu/marynell/grammar/reprtdsp.html
The charts here are helpful.

Thank you so much teacher

When reporting indirect speech, it is important to consider the appropriate tense to use in the reported clause. In this case, Joe asked Nelson a question about the past, so we need to use the past tense.

The correct reported speech sentence would be: Joe asked Nelson when Gabriel had reached home.

To understand why we use the past perfect tense ("had reached") instead of the simple past tense ("did reach"), we can break down the sentence:

1. Original question: When did Gabriel reach home?
2. Reported speech: Joe asked Nelson when Gabriel reached home.
3. Past tense transformation: Joe asked Nelson when Gabriel *had reached* home.

In reported speech, we shift the tense of the verb one step back. Since "did reach" is in the simple past tense, we change it to "had reached," which is the past perfect tense.

Therefore, the correct sentence in indirect speech is: Joe asked Nelson when Gabriel had reached home.