This is a problem which is very, very common and unfortunately has no good solution.. Let me write just a few hints here. (I will assume that "GPA" is some kind of grade.)
1) First of all, please make sure that Class B is "worse than avarage" and not that Class A is "better than avarage". I want to say that if it is the case that by the syllabus, after course 1, students are expected to have level B, you should teach for level B (even if teacher A was especially motivated/good and did more than expected). This is especially important if you are both teacher A and the teacher of the second course.
2) If your insitution has meetings about teaching quality, mention this problem here. (Try to be diplomatic: do say "A and B teach different topics" instead of "B's students are unprepared." (In fact, it could be that B teaches different things than A and your course is about A's topics.) Try to find a solution together: Maybe one teacher can teach all three courses? Or all can follow one book and cover the same topics? Or at least all teachers teaching those courses can come from the same "group"?
3) Use the first course hours to make a recap of the first course and to determine student's levels. Give them material to study the first course on their own, tell them which topics are especially important. If time permits, make addditional sessions/additional homework for students of level B to bring them to a good niveau.
4) Be as transparent as possible about what you expect. Create a syllabus and, if possible, a course homepage. Make them accessible as early as possible to the students so that they have more time to learn the material.
(I implied here that if (1) does not hold, really teach for niveau A. I think you have an obligation that your student have learned after the course what the syllabus says.)
Ultimately, it is the student's responsibility to learn. (At least where I come from) students know this and will be angry against teacher B rather then against you. From my experience, there are many bad teachers/useless classes in university - students usually learn soon that they have to learn by themselves. Sometimes, they take other courses before and just take course 1 again next year - but this time with teacher A instead of B.