Well sad but i guess your friend tried to go pass a orange light not knowing the front car might stop and as per rules its your friends fault..
if u hit any car from behind even he stops too quickly or slowly its the fault of driver behind that car.. so always keep a safe distance from the car in front but most people now days try to get real close to car in front hmmz what can i say i guess TALLLIM ke Kami