I am tempted to ask: What would you think if the roles were reversed, and you were the one who took the $100 from a stranger and what you would hope the stranger's response would be if it was discovered that you took the money and then gave it back? But I will try a different approach. Taking the case as you describe it: I suggest you would be within your rights (and not wrong) to report this as a theft and the stranger would then face whatever penalty the law specifies for petty theft, but I think you would also be within your rights (and not wrong) to not report this. Imagine that the stranger changed his or her mind within just two minutes and apologized profusely to you, perhaps even offering you the lottery ticket he just bought (and did not steal) and this gives you a finite chance of winning millions later in the week. Still, a theft or stealing has taken place even it the funds are returned. Imagine that the stranger stole millions from a pension account for hundreds of vulnerable, retired people. Even if never detected and the money is returned with interest after a week, the person wrongfully took possession of something that he or she was not entitled to. We might even consider a more dramatic case: imagine a stranger puts a poison in your coffee that you do not detect and it will kill you after 24 hours. After 23 hours the stranger repents. He happens to have a cure that will remove the poison from your system, leaving no trace and, instead will actually provide you with life-extending vitamins. Imagine the stranger is able to put the cure in your sparkling water and the only difference you notice is a renewed sense of vitality and cheer. If discovered later (perhaps there is a reliable informant who discloses what took place or the stranger confesses or the poison and cure-maker comes forward), I think most of us would think (rightly) that the stranger was guilty of attempted murder and that the state has a legitimate reason to take action in the form of punishment (or perhaps committal to a psychiatric ward until one may be certain that the stranger has been cured of whatever pathology drove her or him to put you through this threatening experience).
Great question! In practice, at least in the United States, the punishment and even the trial will be different. The 10 year old would be tried in juvenile court. The jury would not be made up of only 10 year olds. John, on the other hand, would have a jury (if there was a jury) of fellow adults or peers, and the possible consequences would be different. I suggest that one reason for a difference in punishment is that while both John and Jack admit responsibility (which I assume involves admitting that they knew that what they did was wrong) the child (and a 10 year old is a child, based on international standards, e.g. UN definition of childhood) did not have as full of a grasp of the wrongness of the action as the adult. It may also be the case that the child had / has less resources mentally to address deviant desires / urges. I think we expect adults to engage in greater self-mastery, to exercise greater restraint and control of desires than children. Although the claim may seem odd: sanity for a child may differ at least in degree from sanity for an adult. It would be odd, but not insane for my four year old nephew to think he could put on a ring that would make him invisible (after all, Bilbo Baggins did this in The Hobbit and The Lord of the Rings), but I would be quite insane to think so.
There might also be another way to think of punishment: if a 10 year old is found guilty and given a 10 year sentence, by the time he is 20 he will have spent half of his life in prison. Insofar as part of the role of punishment through prison / incarceration is rehabilitation and reformation, this may be more likely to hurt Jack's chances of reforming. Under such circumstances, perhaps less than 10 years incarceration is warranted (especially if there is admission of guilt, reform, parole, reliable supervision when released...). Perhaps a lesser sentence would be less likely to harden him into a life of such crime. John getting a 10 year sentence would perhaps also harden him, though it would mean that he has spent less of his life time in prison than Jack. It may be that John is more likely to think that he is not a hardened criminal, but someone who made a mistake and paid for it with one third of his life...as opposed to Jack who might (again "might") think: "Half of my life I have been branded a criminal. That is who I am."
That's my best shot at this point in replying to your most excellent question.
Allow me to add that your question really forces one to think about a philosophy of age or aging. When do the values, the virtues and vices of childhood, differ (if at all) from what we think of as the virtues and vices of adulthood? Along with Elizabeth Olson as co-author, we address this in a chapter in a forthcoming book The Catcher in the Rye and Philosophy. There are no easy answers, I am afraid, but there are some good suggestions by other contributors to the book, due out in 2012.
What is quite interesting about the lex talionis ("an eye for an eye....") is that it functioned to limit retaliation (e.g. if my neighbor injures my eye, I am not thereby authorized to kill him and his family). In any case, there are many theories of punishment. These include the notion of retributive justice, the communication theory of justice, utilitarian theories, and so on.
Keeping this reply short, you might consider a thought experiment (not my own) that will test your views about punishment and revenge. Imagine someone has done great harm to those you love --imagine a case in which someone killed a member of your family due to driving while intoxicated. Consider now two possibilities: in the one the person is punished (proportionately) and through this he comes to understand that what he did was wrong (imagine that until this event he lived as though he had little or no responsibility for others). Imagine, too, that through this process he becomes rehabilitated and even (when released from jail) he works to make financial compensation for the famiies and dependents that were injured. Now consider a different option: through either psycho-surgery or chemicals the wrong-doer can be instantly changed to a rehabilitated state and motivated to make the same compensation. In this case, you get the same end point, but without the punishment. Do we miss something in the second case that we have in the first?
The thought experiment may be flawed after all, would we ever know that psycho-surgery or chemicals could guarantee the results? but I think we do miss something when punishment is missing. Punishment serves to institutionally remove any pleasure from the wrong-doing and (at its best) provides a more rooted foundation for reform than the imagined chemical and surgical interventions. Still, institutions of punishment in the real world (and not just in thought experiments!) are often deeply flawed, and so any final, practical philosophy of punishment will need to take into account not just the ideal but the probable outcome of this or that punishment.
A final note on revenge: at least two things may distinguish a just punishment from revenge. The latter is often personal (e.g. if I am injured, I want to be the one who inflicts harm) and, unlike the lex talionis, has no upper limit.