Both are correct, depending on the time that it is being spoken (God makes changes in how He deals with man-this is known as 'Dispensationalism'). Looking at the first, 'an eye for an eye and a tooth for a tooth' that sounds pretty harsh. Remember that were no prisons. These punishments were to prevent overpunishment. So, you would receive no more then you deserved. This was Old Testament law. In comparision of the laws then in existance it was far superior to anything in existance in fairness. In Matt. 5 when speaking of the coming Kingdom of Heaven, Christ says these laws will be changed (turn the other cheek, go the extra mile etc.)
Moreover, justice was to be meted out by the gov't not personal vengeance (Vengeance is mine saith the Lord,I will repay) The Christian is already under a new set of standards,
Dearly beloved avenge not yourselves, but rather give place unto wrath: for it is written, Vengeance is mine, I will repay, saith the Lord. Be not overcome of evil, but overcome evil with good (Rom.12:19,21)Regarding 'killing' that had to do with murder, since Christ quotes that verse in Matt. 19:18 and uses the word 'murder' not killing.