Take into account that there was a possible co-regency. The chronology and period-placing of the kings is an intricate affair, and there is no agreement on this. Not even among biblical scholars. For the message it does not make much of a difference. Amaziah succeeded after his father Joash, after he was assassinated (see further at 2 Kings 14:5).
1 In the second year of Joash the son of Joahaz, king of Israel, Amaziah the son of Joash, king of Judah, began to reign.