The brief mention of Jonah in 2 Kings 14:25 states that a prophecy he uttered did come to pass. We are not told what that prophecy was, only that it had to do with the extent of Israel's boundaries. It helps date Jonah's ministry.
The prophecy we are given details about has to do with God telling Jonah to go to the great city of Nineveh "and preach against it" (1:4) due to its great wickedness. We know that Jonah disobeyed at first, but then did do as God commanded. He preached that Nineveh would be overturned in forty days. However, that was a provisional warning, dependent on whether the people would repent or not.
The brevity of Jonah's preaching - confined to repeating merely eight words - belies the other bit of information provided, namely, that he was preaching there for three days. We are told what he said on the first day. That is all (3:4). Here is a commentary on that:
"There is no mention made of the second or third day, presumably
because of the immediacy of the response. He began his first day's
activities, and - then we are not told precisely how far into the
first day, but the implication is not too far - he proclaimed, 'Forty
more days and Nineveh will be overturned.'
"...Is this all that he said? It seems unlikely. The terse style of
the narrative has demonstrably led to condensation in many places
(1:10; 4:2), and that seems probable here also. Certainly the
knowledge the king shows of the grounds of divine condemnation in 3:8
suggests that Jonah clearly told them why this judgment was impending.
Did Jonah tell them about his own experience? From the book of Jonah
itself there is nothing to prove this. In the N.T., however, Jesus
clearly says, 'This is a wicked generation. It asks for a miraculous
sign, but none will be given it except the sign of Jonah. For as Jonah
was a sign to the Ninevites, so also will the Son of Man be to this
generation.' (Luke 11:29-30)...
It is thus the case that when Jonah preached in Nineveh, we are not to
think of him as only uttering the words, 'Forty more days, and Nineveh
will be overturned.' The main theme of his message was God's impending
judgment on sin, so as to stir up the Ninevites to the gravity of
their situation.... In this way we can see that the message Jonah
eventually brought to the Nineveh went further than that announced in
1:2. Originally the emphasis had been on divine displeasure with the
conduct of the Ninevites. Now it became one of imminent punishment,
but with the prophet himself as a living example of God's willingness
and power to save." (Jonah pp 41-42, John L. Mackay, Christian
The judgment of God would certainly have been carried out IF the king and the citizens had not repented. Just because God showed mercy when they heeded his warning is no basis for saying Jonah's prophecy failed; that it did not come to pass. We are not told all the words of the message proclaimed by Jonah. If that message included mention of the possibility of averting disaster should they repent, then the entirety of the message would mean that what Jonah preached was the truth.
It is significant that Jesus stated God looking with favour on the repentant Ninevites. Jesus used their repentance to warn the people of his day: "The men of Nineveh will stand up at the judgment with this generation and condemn it; for they repented at the preaching of Jonah, and now one greater than Jonah is here" (Matthew 12:41; Luke 11:32). That is why I would argue that both of Jonah's prophecies came to pass.
Footnote: This link might be helpful for further information on the matter of Jonah and the ancient city of Nineveh - https://armstronginstitute.org/639-is-the-book-of-jonah-entirely-ahistorical