Question 1044345
[[[x}}}= total number of lollipos
{{{J}}}= number of lollipops Joe has
{{{A}}}= number of lollipops Amirah has
{{{G}}}= number of lollipops Gastle has
{{{S}}}= number of lollipops  Sharifa has
"Joe, Amirah,Gastle and Sharifa had some lollipops" translates as
{{{x=J+A+G+S}}} .
"Joe had 5 lollipops less than 1/3 the total number of lollipops" translates as
{{{J=(1/3)x-5}}} .
"Amirah had 36 lollipops more than 1/3 the total number of lollipops" translates as
{{{A=(1/3)x+36}}} .
"Gastle had 1/5 the number of lollipops" translates as
{{{G=(1/5)J}}}
"Sharifa had 5 lollipops less than Gastle" translates as
{{{S=G-5}}} .
The whole problem translates as
{{{system(x=J+A+G+S,J=(1/3)x-5,A=(1/3)x+36,G=(1/5)J,S=G-5)}}} .
It looks complicated, but everything can be expressed as a linear function of {{{x}}} .
{{{system(x=J+A+G+S,J=(1/3)x-5,A=(1/3)x+36,G=(1/5)J,S=G-5)}}} ---> {{{system(x=J+A+G+S,J=(1/3)x-5,A=(1/3)x+36,G=(1/5)((1/3)x-5)x,S=(1/5)x-5)}}} ---> {{{system(x=J+A+G+S,J=(1/3)x-5,A=(1/3)x+36,G=(1/5)(1/3)x-(1/5)5,S=(1/5)x-5)}}} ---> {{{system(x=J+A+G+S,J=(1/3)x-5,A=(1/3)x+36,G=(1/15)x-1,S=(1/5)x-5)}}} ---> {{{system(x=J+A+G+S,J=(1/3)x-5,A=(1/3)x+36,G=(1/15)x-1,S=(1/15)x-1-5)}}} ---> {{{system(x=J+A+G+S,J=(1/3)x-5,A=(1/3)x+36,G=(1/15)x-1,S=(1/15)x-6)}}} ---> {{{system(x=(1/3)x-5+(1/3)x+36+(1/15)x-1+(1/15)x-6,J=(1/3)x-5,A=(1/3)x+36,G=(1/15)x-1,S=(1/15)x-6))}}} .
We are really only interested in the first equation. We will use the other ones just to verify the answer.
{{{x=(1/3)x-5+(1/3)x+36+(1/15)x-1+(1/15)x-6}}}
{{{x=(1/3)x+(1/3)x+(1/15)x+(1/15)x+36-5-1-6}}}
{{{x=(2/3)x+(2/15)x+24}}}
{{{x=(10/15)x+(2/15)x+24}}}
{{{x=(12/15)x+24}}}
{{{x=(4/5)x+24}}}
{{{x-(4/5)x=24}}}
{{{(1/5)x=24}}}
{{{5(1/5)x=5*24}}}
{{{highlight(x=120)}}}
 
Let's verify by substituting {{{x}}} in the original equations:
Substituting {{{x=120}}} we get
{{{J=(1/5)120-5=40-5=35}}} and
{{{A=(1/5)120+36=40+36=76}}} .
Substituting {{{J=40}}} we get
{{{G=(1/5)35=7}}} .
Substituting {{{G=8}}} we get
{{{S=7-5=2}}} .
Now, substituting {{{system(J=35,A=76,G=7,S=2)}}} into {{{x=J+A+G+S}}} we get
{{{x=35+76+7+2=120}}} .
So, the calculations check, and {{{highlight(120)}}} was the correctly calculated total number of lollipops.