Who's at fault if there's a 7 car pile up on freeway due to someone changing tire in the left lane you were last car and hit car in front of you but they hit car in front of them first?

If you hit a car from behind, you are going to be held to be at fault. If a car hits you from behind, they are going to be held at fault. Most jurisdictions consider hitting the back of a car prima facia evidence that you were following too closely. You could literally have six cars at fault in this case, each one for hitting the one in front of it.