He saw an Egyptian beating one of the Israelis. So he went over to help [MTY] the Israeli man who was being hurt/beat {whom the Egyptian was hurting/beating}, and he ◄got revenge on/paid back► the Israeli man by killing the Egyptian who was hurting/beating him.