The traveller asked the policeman that if he could tell him the way to the nearest hotel.
The policeman replied yes.
He asked if he needed the one in which he could spent the night and could leave the next day.
The traveller replied no and he only wanted a meal.
When we change a sentence into indirect speech we first change the sentence(question) into Statement. Inverted commas are removed, the tense is changed into past tense, said is changed into asked etc..