The pretzel salesman is Oscar, a character from the Thimble Theater (Popeye) comic strip.
The story is sort of a half twist on the tale The Prince and the Pauper, first published by Mark Twain in 1881. Real life is exciting, but at day's end, duty calls. The film Roman Holiday (1953) is another example, of many.
Betty is performing a wild West inspired act here, a popular entertainment theme, thanks to the numerous cowboy films of the era.