This is really hard, and I’m sorry she is in this situation. I would probably say stick it out if she can get a B and otherwise switch to P/F if it is before the deadline to do so.
If you really don’t like your current options, would finding a really good tutor help? Does she have any idea how the other students in the class are doing? If they are all doing well, maybe there is just one or two fundamental concepts that she needs to more fully master and then the rest will click into place.