document.write( "Question 846445: Three boys are talking about how many sweets they each have.\r
\n" ); document.write( "\n" ); document.write( "A: B has the most!
\n" ); document.write( "B: If C gave me one sweet, I'd have twice as many as A does.
\n" ); document.write( "C: It'd be better if B gave me two sweets. Then we'd all have the same amount!\r
\n" ); document.write( "\n" ); document.write( "How many sweets are there in total?\r
\n" ); document.write( "\n" ); document.write( "I know the answer but the algebra is giving me trouble.
\n" ); document.write( "

Algebra.Com's Answer #509725 by KMST(5347)\"\" \"About 
You can put this solution on YOUR website!
\"A\"= number of sweets A has.
\n" ); document.write( "\"B\"= number of sweets B has.
\n" ); document.write( "\"C\"= number of sweets C has.
\n" ); document.write( "We could even define \"N=A%2BB%2BC\" .
\n" ); document.write( "
\n" ); document.write( "The fact that C says
\n" ); document.write( "\"It'd be better if B gave me two sweets. Then we'd all have the same amount!\"
\n" ); document.write( "means \"B-2=C%2B2=A\" .
\n" ); document.write( "That is 3 equations, but not independent, so it is worth 2 equations.
\n" ); document.write( "
\n" ); document.write( "The fact that B says
\n" ); document.write( "\"If C gave me one sweet, I'd have twice as many as A does.\"
\n" ); document.write( "means that \"B%2B1=2A\" .
\n" ); document.write( "With that last equation, we have 3 independent equations, and that's enough to solve.
\n" ); document.write( "\"system%28A=B-2%2CA=C%2B2%2CB%2B1=2A%29\"
\n" ); document.write( "We could even add \"N=A%2BB%2BC\" and say we have a system of 4 linear equations, but why complicate when you can make it simpler.
\n" ); document.write( "
\n" ); document.write( "Since two of the equations in \"system%28A=B-2%2CA=C%2B2%2CB%2B1=2A%29\" have only A and B, I can solve for A and B with just two equations:
\n" ); document.write( "\"system%28A=B-2%2CB%2B1=2A%29\" --> \"system%28A=B-2%2CB%2B1=2%28B-2%29%29\" --> \"system%28A=B-2%2CB%2B1=2B-4%29%29\" --> \"system%28A=B-2%2CB%2B5=2B%29%29\" --> \"system%28A=B-2%2C5=B%29%29\" --> \"system%28A=5-2%2Chighlight%28B=5%29%29%29\" --> \"highlight%28system%28A=3%2CB=5%29%29%29\"
\n" ); document.write( "
\n" ); document.write( "Now I can use the results above and the equation I have not used to find C.
\n" ); document.write( "\"system%28A=3%2CA=C%2B2%29\" --> \"3=C%2B2\" --> \"3-2=C\" --> \"highlight%28C=1%29\"
\n" ); document.write( "
\n" ); document.write( "Now, I can find the total
\n" ); document.write( "\"A%2BB%2BC=3%2B5%2B1\" --> \"A%2BB%2BC=highlight%289%29\"
\n" ); document.write( "
\n" ); document.write( "
\n" );