I would not physically intervene if I saw anyone attacking anyone. I would call the police at once as an emergency.
I would not risk getting attacked myself. And that happens. You can even end up with both of them on you. I think you have to balance acting to help a stranger with minimising the risk to yourself.
I realise that probably makes me sound awful, but I don't want to get punched if there is another, less risky, way that I can help.