I have changed your question slightly to make more sense as it was somewhat confused. The main action of Chapter 22 isn't actually focussed on the Duke and the King, but on the mob that has come to lynch Colonel Sherburn and how he faces them down, and then the trip Huck takes to the circus. Finally we return to the Duke and the King and their latest exploit as they finally get to deliver their Shakespeare play. However, this is not a success to put it mildly:
Well, that night we had our show; but there warn't only about twelve people there - just enough to pay expenses. And they laughed all the time, and that made the duke mad; and everybody left, anyway, before the show was over, but one boy which was asleep.
It is clear that performing Shakespeare is not going to get the kind of income that the Duke and King want, so they decide to have a "low comedy", advertised with the final bottom line that is actually written in the biggest text, which says:
LADIES AND CHILDREN NOT ADMITTED.
As the Duke says at the end:
"If that line don't fetch them, I don't know Arkansaw!"
Thus Twain offers hope to the con men by showing how they have learnt from their attempt to perform Shakespeare and are now planning something that is more to their audience's level - and so the stage is set for the Royal Nonesuch, that turns out to be far more lucrative for the con men.