If your friend was not at fault and did not cause the accident in any way, then he does not have to do anything, either paying diyah (blood money) or offering expiation. Expiation must be offered by the other driver who was at fault, and his male relatives must pay the diyah (such as his father, his paternal uncles, his brothers and his nephews). If they were both at fault, then the diyah must be paid by both sets of male relatives (each according to his proportion of blame), and each of them must offer expiation in full.
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (12/116):
Whoever is partly to blame for killing must offer expiation; it must be offered by him and by everyone else who shares the blame with him. This is the view of the majority of scholars, including al-Hasan, ‘Ikrimah, al-Nakha’i, al-Thawri, Maalik, al-Shaafa’i, and the ashaab al-ra’i. End quote.
There are three main reasons for the mistake that may have happened in this case:
Either it happened because of carelessness in maintenance of the car, such as the brakes etc.
Or the problem may have been with the driver, such as if he was driving the car when he needed to sleep, or was distracted by something that kept him from focusing fully on driving
Or it was the result of failing to obey the traffic rules.
Determining the mistake and who is at fault is something that must be left to the experts in that field.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said, in his essay Ahkaam Hawaadith al-Sayaaraat (Rulings on auto accidents) that if one of the passengers who got in the car with the driver by his own free will is injured, then one of the following four scenarios must apply to this accident:
It happened as the result of aggressive action on the part of the driver, such as if he was going at a speed which caused the accident, or he slammed on the brakes for no reason and the accident happened as a result.
It happened as the result of negligence on the part of the driver. The difference is that aggressive action means doing something that is not justified, whereas negligence means failing to do something that is required, such as failing to close doors properly, or to fill the tires properly with air, or to fix something that needs fixing, and the accident happened as the result of that negligence.
In these two cases, expiation must be offered by the driver. The expiation is freeing a slave for each human life protected by sharee’ah that was lost; if he cannot do that then he must fast for two consecutive months and not break the fast except for a legitimate shar’i excuse such as travelling, sickness and the like. Compensation for any property damaged or destroyed and diyah for the lives lost must also be paid by his male kin.
It happened as the result of the driver swerving to avoid danger, such as if something was coming towards him which he feared might hit him, or if someone pulled out from the right or the left in such a way that he could not stop, so he swerved to avoid that danger, and the accident happened.
If happened as the result of no cause on his part, such as if one of his tires blew or a bridge collapsed beneath him and he could not tell that there was something wrong with it.
In these two cases, he does not have to offer any expiation or pay any compensation, because in the first case he was doing what he is required to do of trying to avoid danger, so he was doing the right thing, and no ground (of complaint) can there be against those who do good (cf. al-Tawbah 9:91).
In the second case he was doing the right thing and did not commit any act of aggression or negligence, so he does not have to do anything, because he did not cause the accident. End quote.
This essay was published in the official journal of the Imam Muhammad ibn Sa’ood Islamic University, 12 Sha’baan 1409 AH
Shaykh Ibn Baaz (may Allaah have mercy on him) was asked concerning a man whose car rolled over and his wife died: does he have to offer any expiation or not?
If you were not negligent in your driving or in taking care of your car, and the accident happened when the state of your car, your driving and your health were all normal, then you do not have to do anything because there is no proof that you caused the accident. But if it is proven that you fell short with regard to what is mentioned above, then you have to offer expiation, by freeing a believing slave; if you cannot do that, then you must fast for two consecutive months, because Allaah says (interpretation of the meaning):
“It is not for a believer to kill a believer except (that it be) by mistake; and whosoever kills a believer by mistake, (it is ordained that) he must set free a believing slave and a compensation (blood money, i.e. Diya) be given to the deceased’s family unless they remit it. If the deceased belonged to a people at war with you and he was a believer, the freeing of a believing slave (is prescribed); and if he belonged to a people with whom you have a treaty of mutual alliance, compensation (blood money — Diya) must be paid to his family, and a believing slave must be freed. And whoso finds this (the penance of freeing a slave) beyond his means, he must fast for two consecutive months in order to seek repentance from Allaah. And Allaah is Ever All‑Knowing, All‑Wise”
Fataawa Islamiyyah, 3/358-359
And Allaah knows best.