This is presented (slightly abbreviated and paraphrased) as follows:
"Four married couples had $32$ bottles of lemonade between them at a picnic.
Mary had 1 bottle, Anne had 2, Jane had 3 and Elizabeth had 4 bottles.
John MacGregor had the same number of bottles as his wife;
Lloyd Jones drank twice as much as his wife;
William Smith drank three times as much as his wife;
Patrick Dolan drank four times as much as his wife.
The puzzle is to match the ladies to the surnames.
Who was married to whom?"
It boils down to finding the values of $a$, $b$, $c$ and $d$ where: $$a + 2 b + 3 c + 4 d = 22$$
and $\{a, b, c, d\} = \{1, 2, 3, 4\}$
It is straightforward but tedious to work it out by trial and error, which gets you to: $$a = 3, b = 4, c = 1, d = 2$$
thus giving us $3 \times 1 + 4 \times 3 + 1 \times 3 + 2 \times 4 = 3 + 8 + 3 + 8 = 22$, and so:
Mary was Mrs. Smith, Anne was Mrs. Doyle, Jane was Mrs. MacGregor, Elizabeth was Mrs. Jones.
But is there an algebraic / number-theoretical way of solving this?
Something tickling the back of my mind makes me think of Newton-Girard formulas, but I haven't worked out how they can help.
EDIT:
This puzzle is reprised as 51: Sharing the Apples where in this case it is four brother-sister pairs sharing 32 apples between them.
Starting from:
$$a+2b+3c+4d=22$$
we can infer that $a+3c=22-2b-4d$ is even. Hence $a,c$ must be both odd or both even. If both even, then either $a=2$ and $c=4$ or vice versa, but in either case:
$$a+3c\equiv2 \pmod4$$
while, since $b$ will be odd:
$$a+3c=22-2b-4d\equiv0 \pmod4$$
Thus we have a contradiction, so $a,c$ must be both odd and therefore $b,d$ must be both even.
$d$ cannot be $4$ since any assignment of $(1,2,3)$ to $(a,b,c)$ yields:
$$a+2b+3c>22-(4\times4)=6$$
So we must have $d=2$ and $b=4$ implying:
$$a+3c=22-(2\times4)-(4\times2)=6$$
from which it is readily seen that $a=3$ and $c=1$.