During Aaron's betrayal of the Orlin kingdom, he was suspected of treason and under the name Mat. However, what actually happened was that he was a soldier ordered by Gretta to find out information about Mat.
It was not Aaron who informed the Rhys army about Mat's position and Amethyst's new position at that time. Gretta did it, told Mateo and ordered Mateo to give the information to Rhys.
Then it was Mat's case who also knew of the arrival of Rhys' troops so that Mat had prepared with the troops he had to stand guard. It was also Gretta who told him through Mateo.
That was the reason for Mat not killing Mateo at that time. He felt indebted to Mateo for the information Mateo gave him, even though at that time Mat did not know that Mateo was Gretta's soldier.