Buttercup made the whole baby-swapping story upGiven the massive age disparity between the Captain and Ralph, this is probably closer to the truth of the matter, but what if there was no switch of babies? Buttercup made up the story to clear the way for Ralph and Josephine and to lower the Captain to the level where she could marry him. Everyone plays along because it suits their purpose other than Sir Joseph, who's just too dim to catch on.
Buttercup is Ralph's MotherIf the above is true, what horrible scandal is Buttercup referring to when she identifies Ralph and cries, "Remorse, Remorse"? Simple, she's his mother. He's the result of an assignation in port, possibly with the Captain, and she put him in an orphanage. She recognizes his features and the name she gave him, and immediately starts scheming for how to guarantee a happy life for her son, thus leading to her ridiculous story of him actually being of high birth and switched out with the Captain.