This problem dates from at least 1774; this version appeared in the American Mathematical Monthly of December 1902:
Three Dutchmen and their wives went to market to buy hogs. The names of the men were Hans, Klaus, and Hendricks, and of the women, Gertrude, Anna, and Katrine; but it was not known which was the wife of each man. They each bought as many hogs as each man or woman paid shillings for each hog, and each man spent three guineas more than his wife. Hendricks bought 23 hogs more than Gertrude, and Klaus bought 11 more than Katrine. What was the name of each man’s wife?
(There are 21 shillings in a guinea.)