There is a lesson within the Talmud about this contradiction.
Talmud - Mas. Sanhedrin 98a
Alexandri said: R. Joshua b. Levi pointed out a contradiction. it is written, in its time [will the Messiah come], whilst it is also written, I [the Lord] will hasten it!33 — if they are worthy, I will hasten it: if not, [he will come] at the due time. R. Alexandri said: R. Joshua opposed two verses: it is written, And behold, one like the son of man came with the clouds of heaven34 whilst [elsewhere] it is written, [behold, thy king cometh unto thee . . . ] lowly, and riding upon an ass!35 — if they are meritorious, [he will come] with the clouds of heaven;36 if not, lowly and riding upon an ass. King Shapur [I] said to Samuel, ‘Ye maintain that the Messiah will come upon an ass: I will rather send him a white horse of mine.’37 He replied, ‘Have you a hundred-hued steed?’38
In order to understand this passage in the Talmud, we need to understand who Mashiach is and where he fits into Rabbinic/Biblical eschatology.
To get to this we need to find out three things:
1. What does the Tanakh say about who is ‘Mashiach’?
2. What do the Rabbis mean by ‘Mashiach’?
3. Where do the Rabbis get their idea of more then one Mashiach
To understand this we need to look at some of the ‘end-times’ prophecies of the Tanakh. While much of the arguments with missionaries deal with passages that are unclear as to when or to whom they apply, there are passages in the Tanakh that announce that they are dealing with a specific period called ‘the end of days’. Some of them mention particular characters that seem to have a role to play in this future period:
One of the most well known passages that is explicit about being an end-times prophecy is Isaiah 2:2-4. Verse 4 is one of the most well known verses in the Tanakh.
Yeshayahu- Isaiah - Chapter 2
1. The word that Isaiah, son of Amoz, prophesied concerning Judah and Jerusalem.
2. And it shall be at the end of the days, that the mountain of the Lord's house shall be firmly established at the top of the mountains, and it shall be raised above the hills, and all the nations shall stream to it.
3. And many peoples shall go, and they shall say, "Come, let us go up to the Lord's mount, to the house of the God of Jacob, and let Him teach us of His ways, and we will go in His paths," for out of Zion shall the Torah come forth, and the word of the Lord from Jerusalem.
4. And he shall judge between the nations and reprove many peoples, and they shall beat their swords into plowshares and their spears into pruning hooks; nation shall not lift the sword against nation, neither shall they learn war anymore.
Here we see an announcement of the end of days with a few specifics of that time. These issues mentioned will help us to find more passages dealing with this time period. Let’s see what will happen then:
1. People will gather in Jerusalem to worship HaShem (verse 2-3)
2. War will end (verse 4)
3. The nations will be judged (verse 4)
In Isaiah 11 we see an expansion of these themes. Just as above we have: people gathering in Jerusalem in verse12, the end of war in verse 6-8, and the judgment of nations in 2-5.
Yeshayahu - Isaiah - Chapter 11
1 And a shoot shall spring forth from the stem of Jesse, and a twig shall sprout from his roots.
2 And the spirit of the Lord shall rest upon him, a spirit of wisdom and understanding, a spirit of counsel and heroism, a spirit of knowledge and fear of the Lord.
3 And he shall be animated by the fear of the Lord, and neither with the sight of his eyes shall he judge, nor with the hearing of his ears shall he chastise.
4 And he shall judge the poor justly, and he shall chastise with equity the humble of the earth, and he shall smite the earth with the rod of his mouth and with the breath of his lips he shall put the wicked to death.
5 And righteousness shall be the girdle of his loins, and faith the girdle of his loins.
6 And a wolf shall live with a lamb, and a leopard shall lie with a kid; and a calf and a lion cub and a fatling [shall lie] together, and a small child shall lead them.
7 And a cow and a bear shall graze together, their children shall lie; and a lion, like cattle, shall eat straw.
8 And an infant shall play over the hole of an old snake and over the eyeball of an adder, a weaned child shall stretch forth his hand.
9 They shall neither harm nor destroy on all My holy mount, for the land shall be full of knowledge of the Lord as water covers the sea bed.
10 And it shall come to pass on that day, that the root of Jesse, which stands as a banner for peoples, to him shall the nations inquire, and his peace shall be [with] honor.
11 And it shall come to pass that on that day, the Lord shall continue to apply His hand a second time to acquire the rest of His people, that will remain from Assyria and from Egypt and from Pathros and from Cush and from Elam and from Sumeria and from Hamath and from the islands of the sea.
12 And He shall raise a banner to the nations, and He shall gather the lost of Israel, and the scattered ones of Judah He shall gather from the four corners of the earth.
13 And the envy of Ephraim shall cease, and the adversaries of Judah shall be cut off; Ephraim shall not envy Judah, nor shall Judah vex Ephraim.
14 And they shall fly of one accord against the Philistines in the west, together they shall plunder the children of the East; upon Edom and Moab shall they stretch forth their hand, and the children of Ammon shall obey them.
15 And the Lord shall dry up the tongue of the Egyptian Sea, and He shall lift His hand over the river with the strength of His wind, and He shall beat it into seven streams, and He shall lead [the exiles] with shoes.
16 And there shall be a highway for the remnant of His people who remain from Assyria, as there was for Israel on the day they went up from the land of Egypt.
Besides the repetition of what is in Isaiah 2, this passage adds a few new points that add to our picture of the end-times:
1. There will be a leader, from the tribe of Judah who will also be the judge. (1 and 10)
2. Ephraim (the Northern kingdom of Israel) and Judah (the Southern Kingdom) will no longer contend with each other. (13)
3. The Jewish people will be gathered from exile. (12, 16)
In Ezekiel 37 we find more about this reconciliation of Judah and Ephraim, with some more information about this ingathering period:
Yechezkel - Ezekiel - Chapter 37