Plagiarizing problem sets and homework
Although I do not teach physics I do have a solution that generally works quite well.

The main answer is: It does not matter who copied from whom - fail both.

If one student allows another to copy, then both fail. I enforce this quite strictly and there are some students (who do not pay attention to the warnings I give at the start of the semester) who do it, but they never make the same mistake twice.

As Moriarty said, it is possible that Student B copied from Student A without Student A knowing about it. I solve this problem but calling them both in front of me (private from everyone else) and tell them they have a choice:

Choice A: Both admit that the copying took place with consent of both, and both fail that homework/assignment/test/whatever is being assessed.

Choice B: Student A says that Student B stole Student A's work, and Student A gets off with a warning to be more careful (but no punishment) and Student B fails the module immediately without the opportunity to recover (Student B must re-take the module from the beginning).

I have dealt with many cases this way and only three cases where the students ended up in Choice B. In this case, the offending students admitted that they stole work.

You should never support the student who allows another student to copy from them. That behavior is simply unacceptable and that needs to be made quite clear to everyone.