As to punishment - The more mature A is the more their guilt will plague them properly, the more immature they are the more it will continue to twist them that way. Living that life is its own punishment although it also affects others. So internally, maybe, punishment is handled.
Externally, from society's viewpoint, we are blind to the internal world of each person for the most part. Therefore we anneal our wounds or fears by exacting further punishment on those we deem criminals. Personally, beyond eliciting their own internal shame to do its work, I feel this does more harm than good. So, to be clear, I would say punishment is best accomplished by group efforts at revealing what has been done so that shame is applied and others are forewarned of a breach in good character. This does not mean relegating Person A to any sort of forever shamed status, I suppose rather like the Scarlet Letter. It must be assumed that people can work through their guilt and integrate their shame in order to grow and become a better person. of course, this is only a theory ...