With this little work, Arthur Sullivan made his first entry into the world of comic opera. He had already completed his first operatic work during the early 1860's, but that work (The Sapphire Necklace or The False Heiress with libretto by H. F. Chorley) never reached the stage, and although the rights of publication were, at one point, assigned to the publisher, Metzler, the opera was never printed.
After a brisk overture, the scene opens on a room with a bed, a chest of drawers, a table and chairs, a fireplace, and three doors. Cox is rushing to dress for the day. His landlord, Sergeant Bouncer, helps him get ready, while Cox complains about an uncomfortable pillow and an excessively short haircut, which makes him look like as though he is in the army. Any mention of the army sends Bouncer into a reverie about his own military career. The irritated Cox goes into his dressing-room, while Bouncer sings a mock-Handelian aria about his days in the militia, ending with his favourite catch-phrase, "Rataplan! Rataplan!" Cox asks Bouncer why the room always reeks of tobacco smoke. Bouncer suggests that it must be from the tenant in the attic, but Cox observes that smoke always travels up, not down. Cox also wonders why his supplies of coals, matches, candles, tea, sugar, etc., seem to be disappearing. Bouncer suggests it was the cat. When Cox will not accept this explanation, Bouncer launches into another reprise of "Rataplan! Rataplan!" Cox, at last, is late for work and leaves without resolving the mystery.
Left on his own, Bouncer admits that Cox has left in the nick of time, for the room is let to two different lodgers, neither of whom knows about the other. Cox, a hatter, works all day; Box, a printer, works all night; so they never come in contact, except that they occasionally pass on the staircase. Bouncer hurriedly re-arranges the room, hiding Cox's possessions and putting out Box's.
Box enters, after a brief offstage altercation with Cox on the staircase. After dismissing Bouncer, he takes out a bread roll, lights the fire, and puts a rasher of bacon on the gridiron. Overcome with exhaustion, he lies down on the bed for a catnap. Cox re-enters, having unexpectedly secured a day off from his employer. He is delighted to find a roll on the table, but surprised to find the fire already lit. Assuming that Bouncer has been using the room in his absence, he takes the bacon off the gridiron, replaces it with a mutton chop, and heads off to his dressing room to retrieve his breakfast utensils.
The slam of Cox's dressing room door awakens Box, who suddenly remembers his bacon. When he sees a mutton chop on the gridiron, he assumes it is Bouncer's, and throws it out the window, hitting a pedestrian outside. He once again puts the bacon on the fire, and goes to his dressing room to retrieve his breakfast utensils. The slam of Box’s dressing room door sends Cox scurrying back in, assuming it is the sound of someone knocking. Seeing the bacon on the gridiron once again, he tosses it out the window, hitting the pedestrian for a second time.
Box re-enters from his dressing room, and they confront each other for the first time. Each orders the other to leave. Cox produces his receipt for rent, to prove the room is his, and Box does likewise. Realising they have been duped, they call for Bouncer, who arrives and promptly tries to change the subject with yet another reprise of "Rataplan! Rataplan!" Finally cornered, he admits that the room belongs to both of them, but he says that he will have his little back second floor room ready later the same day. Both lodgers say they will take it, which Bouncer quickly points out makes no sense whatsoever. He leaves them to decide which will vacate the current room. Each suggests the other should leave, but neither will budge. Finally, they realise that it is all Bouncer's fault, and they may as well be friends. They serenade each other on the guitar.
In the course of conversation, Cox admits he has a fiancée, but as she is the proprietor of bathing machines some distance away, she is unlikely to make an appearance. Box says that he is neither single nor married nor widowed, but has been "defunct for the last three years." Cox admits that he would not mind being defunct himself, if it would allow him to escape from unwanted matrimony. Box explains that he was in exactly the same predicament several years ago. On the eve of marriage, he left his possessions at the edge of a cliff with a suicide note. Everyone assumed he had jumped, and so he was free of his intended bride, Penelope Ann. At the mention of that name, Cox realises that his present intended is the same fiancée whom Box had eluded. Cox now declares that he will restore Box to Penelope Ann, while Box says that he would not dream of taking her away from Cox.
Unable to resolve the matter, they at first suggest duelling, but decide on a gentler solution. At first, they throw dice, but each man has a trick die that only throws sixes. Then they try tossing coins, but each one keeps throwing only "heads". At last, Bouncer arrives with a letter from Margate, which they assume must be from Penelope Ann. However, the letter informs them that Penelope Ann was lost in a sailing accident and has left her entire estate to "my intended husband." The two men try to resolve which of them is the beneficiary, but Bouncer arrives with a second letter, informing them that Penelope Ann survived after all, and will be arriving later that day.
They both try to leave, but Bouncer arrives with a third letter: "Being convinced that our feelings, like our ages, do not reciprocate, I hasten to apprise you of my immediate union with Mr. Knox." They rejoice that Penelope Ann is out of the way. Suddenly, Box observes that Cox must surely be his long-lost brother, and Cox says that he was about to make the same observation: Box asks if Cox has a strawberry mark on his left arm. Cox replies that he does not. That settles it: they are long-lost brothers. In a brief finale, they agree that they will remain in the room for good, with Bouncer adding a "Rataplan!" reprise. The curtain falls on general rejoicing.