Yes, indeed, it is 2.178, I am sorry.
As to 5.45 I think the context is different. It seems that he, the addressee of the words of Allah, most likely the prophet himself, has been asked to judge between followers of the previous revelations in bad faith and the speaker, recalls how they were given clear instructions for that an speaks about an eye for an eye, etc.
Ultimately, coming from the same source, there should be some equivalence between what is said in a revelation and what is said in another revelation, but, not necessarily they have to be the same. The Qur'an itself confirms certain differences due to the attitudes of the people that were given the law, like in food.
At any rate, what I understand, is that at some time, the people who received revelations might have been tempted to exact the whole set of teeth for a tooth and so they were held to exat equivalence. But that is a different question from 2.178, where there is in fact no equivalence as to the damaged thing or person itself, but as to the import of that person. That is, it is not a nafs for a nafs, but rather, the same kind of nafs for what is lost. Obviously it cannot be a criminal matter because it is unconceivable that a person different from the killer (whether willful or not) be made to pay for a crime, just because he or she happens to be free, like the dead, or a slave like the dead or a free like the dead or a male like the dead, etc. So forcibly and since there is no statement that there has been a murder, it must be a question of indemnifying the loosers with the dead of the killed. Obviously the murder or non murder of that person would be a different matter.
At the back of it all comes again que need to consider equity by voluntary submission of the members of the society to a fair retribution for losses, instead ot letting the people take retribution at their own free estimation of how angre, depressed, offended, or whatever they are. In sum to put equitative barries to peoples taking the justice into their own hands.
Salaam