How can I deal with these group members?
First of all: You are not alone. This is one of the reasons for group assignments - you'll have to learn how to deal with such people and situations, because in a work environment you will end up exactly in situations like this from time to time. 

I sould suggest talking to your teacher and ask, whether it is ok to label the individual contributions to the text. Then you can work on your part and you are not affected by the performance of others. 

Try to do so in a respectful manner, otherwise A &amp; B might be quite annoyed.