Question 1188617
Let's say there are 3x apple-flavored sweets and 5x strawberry-flavored sweets.
Once Patrick gives away 8/9 of the apple-flavored sweets, he has {{{3x*(1-8/9)=3x*1/9=x/3}}} apple-flavored sweets left.
Patrick also gives away 42 strawberry-flavored sweets, so he has {{{x/3}}} apple-flavored sweets and {{{5x-42}}} strawberry sweets left.
We are given that he has 1/12 of his sweets left after this and {{{(3x+5x)/12=2x/3}}}. So we have {{{x/3+5x-42=2x/3}}}.
 *[invoke explain_simplification "x/3+5x-42=2x/3"]
Since x=9, there were {{{9*8=72}}} sweets at the beginning, so it cost Patrick $0.20*72=$14.40.