Ali asked, "How long will it take to travel from Germany to South Africa?"
Ali asked, "How long will it take to travel from Germany to South Africa?"
Explanation
The correct indirect speech is "Ali asked how long it would take to travel from Germany to South Africa."
Here, "will" changes to "would" in reported speech to match the past tense of the reporting verb "asked."