document.write( "Question 658829: The sum of Patrick's age and John's age is 58.Eight years ago , Patrick was twice as old as John then. What is John's age ? \n" ); document.write( "
Algebra.Com's Answer #410508 by Shana-D77(132)\"\" \"About 
You can put this solution on YOUR website!
If Patrick's age now is x and John's age now is y, then x + y = 58.
\n" ); document.write( "Eight years ago, Patrick's age was x - 8. John's age was y - 8. This is the trickiest part of the problem.\r
\n" ); document.write( "\n" ); document.write( "So, we have to build the second equation:
\n" ); document.write( "\"Eight years ago , Patrick was twice as old as John then.\":
\n" ); document.write( "x - 8 = 2(y - 8)
\n" ); document.write( "x - 8 = 2y - 16 (distributed)
\n" ); document.write( "x - 2y = -8 (subtracted 2y from both sides and added 8 to both sides)
\n" ); document.write( "

\n" ); document.write( "out two equations are:
\n" ); document.write( "x + y = 58
\n" ); document.write( "x - 2y = -8
\n" ); document.write( "----------------
\n" ); document.write( "3y = 66 (used elimination by subtraction to \"get rid of\" the x)
\n" ); document.write( "y = 22
\n" ); document.write( "So, John is 22 years old now and Patrick's age now is (58 - 22) or 36.
\n" ); document.write( "
\n" );