Amaziah’s father Joash was murdered (see 2 Kings 12:20–21). His servants made a conspiracy and two of them struck Joash down. That was the reason that Amaziah’s succession to the throne was not without risks. That is why we read at the beginning of this verse: And as soon as the royal power was firmly in his hand…
Amaziah had to figure out who his opponents were, who could be trusted and who could not, etc. When that was clear and he knew how he could operate safely, he could start the investigation about the murderers of his father. Those who executed the murder were not Israelites (see 2 Chronicles 24:26); they will certainly have been executed. And probably also those who were part of the assassination plot.
From 2 Chronicles 24:20–23 we know that Joash (Amaziah's father who was murdered) was himself a murderer. Joash murdered Zechariah, the son of his spiritual mentor and leader Jehoiada. The murder of Joash is seen by the perpetrators as revenge for this (2 Chronicles 24:25). But they certainly do not have that right, and their actions are inexcusable.
Therefore Amaziah punishes the murderers, and justly so (see also 2 Chronicles 25:3).
5 And as soon as the royal power was firmly in his hand, he struck down his servants who had struck down the king his father.