All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
The general ruling is that if a hired person fulfills what has been agreed upon in the contract, he deserves the full wages.
It is known that the teacher is hired to explain the lessons to the student and to revise them with him, and so on – and not to make him succeed in the exam. So if the teacher does this properly, then he deserves the full wages, and if he is negligent, then he loses from his salary according to the extent of his negligence.
As for the issue of the student's success in the test or not, then this is of no consideration, and the person who hired the teacher has no right to deduct from the teacher's wages because of the failure of the student for not studying his lessons.
Nonetheless, it is not our task to solve the dispute between you and the mother of the student.
Allah knows best.