Nearly crashed, what should I have done?

Okay so I was going down a road and this 2012 silver Honda Civic got really close to me and was tailgating me. I didn't say anything to the person in the passenger seat because then they would say, "You can't control what happens behind you, you can only control what happens in front of you." So then we started going to a light and it was turning yellow and we were far from the light. He starts honking at me many times. The light was solid red and I was making a right at the light. All of a sudden he went on the opposite side of the road (solid yellow line) and speeds RIGHT THROUGH THE LIGHT! Everyone was just sitting there watching him and I was really scared. I then made a right because there was no "No Turn On Red" sign. Then the person on the left of me started coming but he/she probably knew how scared I was so she started slowing down as I went right. He/She was far away though. If there was an accident with the Honda Civic, who would be at fault? Me for not getting out of the way or him for speeding and crossing a solid line at a red stop light and going through it or someone else that started going at the green light. I kind of know the answer but I just want to make sure.

You did absolutely nothing wrong - there's no impetus on you to get out of the way - the speed on roads is governed by a speed limit (limit look it up doesn't mean a minimum unless posted it means don't go faster than).
The person behind you was probably late to work or just a type-a driver who wouldn't stop for yellow light (as they should) anyway.
If there had been a wreck at the light- you would have been a prime witness against the aggressive driver nothing more.
BTW - the passenger was correct you can't control what happens behind you other than to move right to a legal lane if one is available to clear the left lane for faster traffic on highways and other 4 lane roads. (assuming you are not from England)

I'm kind of concerned that you are even asking this question because the answer is so obvious. If the answer is not obvious to you, then you may not understand traffic laws well enough to be driving.

You can only drive your car, not his, too. You did exactly what you should have.
FYI: YOU didn't nearly crash into anyone
My advice… Shake it off… Maybe next time you see the other car, he'll be wrapped around a phone poll, just politely wave as you drive past.