I believe that you should definitely set your own example by not laughing or deriding that other student. If they do something wrong, you shouldn't laugh at them or mock them, but rather try to help them. What you can do as well is ask that other student nicely to stop deriding other students because of a mistake they may have made.