Hello mike/ you can help to your friend to understend some subjekt, work out with him after school.
Try to talk to him and explained that he had to solve its own homework. I did not have such a situation,I also sometimes write off my friend, and now i understend it is bad. I wish you good luck, I hope your friend will understand you