This is correct from all indications in Scripture. These two men are called "prophets", and their miracles correspond to those already recorded. Elijah shut the heavens for 3 1/2 years, and their ministry is also for 3 1/2 years, which also corresponds exactly to the reign of the Antichrist (42 months).
Elias [Elijah] was a man subject to like passions as we are, and he prayed earnestly that it might not rain: and it rained not on the earth by the space of three years and six months. (James 5:17)
And I will give power unto my two witnesses, and they shall prophesy a thousand two hundred and threescore days, clothed in sackcloth... These have power to shut heaven, that it rain not in the days of their prophecy: and have power over waters to turn them to blood, and to smite the earth with all plagues, as often as they will. (Rev 11:3,6)
Elijah also brought fire down from heaven through his prayers: And if any man will hurt them, fire proceedeth out of their mouth, and devoureth their enemies: and if any man will hurt them, he must in this manner be killed. (Rev 11:5) [Note: this is not about a fire-breathing man but a man who prays for fire to descend from Heaven]