Ummm first of all u should or u can realize ur friend that it's his/her fault so she should not blame the teacher. Moreover u can encourage ur friend to do well next time in exams. You can help ur friend in studies,help him or her to make notes . you can tell her parents about this problem bcoz his/her parents can help more than u ...!!!!