The first step for coworkers should be to stay calm as much as possible, although it's a very difficult situation. They should avoid any form of retaliation or inappropriate reaction on their own. After removing themselves from the immediate area, they should document what they saw as accurately as possible, including the time, location, and any relevant details. This information will be crucial when reporting the incident to the appropriate authorities in the workplace. Then, they should cooperate fully with any investigations that may follow to ensure that justice is served and that such behavior is not repeated in the future.
They should not tolerate or encourage such behavior. Some coworkers might be in shock initially, but they need to quickly take action. They could also offer support to each other as witnessing such an event can be quite disturbing. It's important to ensure that proper procedures are followed to deal with this inappropriate situation.
Coworkers should immediately remove themselves from the situation if possible. Then, they should report the incident to their supervisor or the human resources department.