The correct option is
D had a new lease of life
The expression, 'had a new lease of life' means, 'a change to something that makes it more useful'. It also means 'gained new energy and enthusiasm or better health'. Given this meaning, this expression is appropriate for the given sentence and can meaningfully complete it. It means, 'After recovering from that long illness, the princess gained new energy and better health'. Hence, option D is correct.
Option 'A' 'was a pain in the neck' The expression means, 'highly unpleasant physical sensation caused by illness or injury'. It is also informally used to refer to an annoying or tedious person or thing. Hence it does not fit in the given sentence.
Option 'B' 'was on her last legs' is used to refer to someone who is in such a bad condition that she will soon be unable to live as she should normally. Hence it is not appropriate for the given sentence.
Option 'C' 'had egg on her face' means 'appear stupid because of something that she has done'. Hence it does not fit in the given sentence.
Given these meanings, the expressions in options A, B, and C do not meaningfully complete the given conversation and hence, these options are incorrect.