The first order of business for the returnees from Babylon was to rebuild the house of the Lord. The foundation of the temple was completed about 537 B.C., two years after their return. But due to opposition from surrounding non-Jewish neighbors, the building ground to a halt for the next seventeen years.
In the second year of Darius, the Lord raised up two prophets, Haggai and Zechariah, who urged (and at times shamed) the people into completing the task.
But it wasn’t just a matter of getting back to work. The very thing that had stopped the construction, opposition from surrounding nations, had to be dealt with. The opponents went straight to Darius.
Ezra chapter five continues the thread we have seen so often in the Old Testament. God moves to make those not His people be supportive of those who are. Hiram sent supplies to David. The queen of Sheba and the kings of Arabia paid homage to Solomon. Hezekiah was highly regarded by the nations (2 Chronicles 32:23). Jehoiachin was given a seat at the table of the king of Babylon (1 Kings 25:28). Now, Darius affirms the favor Cyrus showed the Jews and (in chapter six) not only approves the construction of the temple, but also orders the opposition to pay for it and pronounces the death penalty on anyone who gets in the way of its construction.
An important point here is that the writer of Ezra not only knew his facts, but also knew of the documents supporting those facts. The Bible did not originate in the fertile imaginations of men, but is the trustworthy account of the people of God and His dealings with them.