It is not legally required to stay at the scene of an accident if you simply witnessed it, but it is the right thing to do. Being a witness could be important in the future, especially if there are few other people around. Consider staying and supporting those involved.