Having been prosecuted, was obliged to be better (3,2)
I believe the answer is:
had up
'having been prosecuted' is the definition.
I know nothing about this answer so I can't tell whether this works.
'was obliged to be better' is the wordplay.
I cannot quite understand how this works, but
'was obliged' could be 'had' (to have to do something is to be obliged to do it) and 'had' is located in the answer.
The remaining letters 'up' is a valid word which might be clued in a way I don't see.
This explanation may well be incorrect...
Can you help me to learn more?
(Other definitions for had up that I've seen before include "Put on trial" , "Called to account before a court" , "Brought before the court" , "being courted" .)