>>Mary is twice as old as Ann was when Mary was as old as Ann now is.
\n" );
document.write( "Ann is 57. Mary is how old?<<
\n" );
document.write( "Let M = Mary's age now
\n" );
document.write( "Let x = the number of years ago we are talking about.
\n" );
document.write( "Mary's age now = M
\n" );
document.write( "Ann's age now = 57
\n" );
document.write( "Mary's age then = M-x
\n" );
document.write( "Ann's age then = 57-x
\n" );
document.write( ">>...Mary [now] is twice as old as Ann was [then]...<<
\n" );
document.write( "Translation: M = 2(57-x)
\n" );
document.write( ">>...Mary [then] was as old as Ann now is...<<
\n" );
document.write( "Translation: M-x = 57
\n" );
document.write( "So we have this system of equations:
\n" );
document.write( " M = 2(57-x)
\n" );
document.write( " M-x = 57
\n" );
document.write( "Solve the second equation for x
\n" );
document.write( " x = M - 57
\n" );
document.write( "Substitute M-57 for x in the first equation
\n" );
document.write( " M = 2[57-(M-57)]
\n" );
document.write( " M = 2(57-M+57)
\n" );
document.write( " M = 2(114-M)
\n" );
document.write( " M = 228 - 2M
\n" );
document.write( " 3M = 228
\n" );
document.write( " M = 228/3 = 76
\n" );
document.write( "That's the answer, Mary is now 76.
\n" );
document.write( "To check solve for x
\n" );
document.write( " x = M - 57 = 76 - 57 = 19 years ago
\n" );
document.write( " Mary's age now = M = 76
\n" );
document.write( " Ann's age now = 57
\n" );
document.write( "Mary's age then = M-x = 76-19 = 57
\n" );
document.write( "Ann's age then = 57-x = 57-19 = 38
\n" );
document.write( "So back when Mary was 57, Ann was 38, and Mary, now 76, is
\n" );
document.write( "indeed twice Ann's age back then, 38.
\n" );
document.write( "Edwin
\n" );
document.write( "