By urging them to ask travelers (v. 29) Job was accusing his friends of holding a provincial viewpoint, one formed out of limited exposure to life. Though some writers have taken verse 31 as a quotation of the view of Job's friends, it is probably Job's own view. "The day"is probably a reference to the final time God will judge the wicked.
This speech explains Job's position that certainly squares with reality better than the one his adversaries advocated. Frequently the wicked do prosper throughout their lives. God does not always cut off evil people prematurely. For example, even though Manasseh was Judah's worst king, he reigned the longest. Even through Mussolini and Hitler died violent deaths, Lenin and Stalin died in their own beds as old men. Furthermore, "All that desire to live godly in Christ Jesus will suffer persecution"(2 Tim. 3:12). Job accused his friends of being wrong.
At the end of this second cycle the advantage in the debate was obviously with Job. Any objective observer of what was going on at that city dump would have had to admit that Job's arguments made more sense than those of his three friends.