Here "He" refers to Jehoash and his army. Alternate translation: "Jehoash and his army came ... Jehoash's soldiers took" (See: [[rc://en/ta/man/translate/figs-synecdoche]])
This implies that Jehoash needed to take these hostages to prevent Amaziah from attacking again. This can be made explicit. Alternate translation: "and they also took to Samaria some prisoners to make sure that Amaziah would cause them no more trouble" (See: [[rc://en/ta/man/translate/figs-explicit]])