J = John´s present age
P = Peter´s present age
John is five years older than Peter mean:
J = P + 5
Five years ago John was J - 5 yrs old , Peter was P - 5 yrs old.
Twice the product of their ages five years ago is 100 more than product of their present ages mean:
2 ∙ ( J - 5 ) ∙ ( P - 5 ) = 100 + J ∙ P
Replace J = P + 5 in this equation.
2 ∙ ( P + 5 - 5 ) ∙ ( P - 5 ) = 100 + ( P + 5 ) ∙ P
2 ∙ P ∙ ( P - 5 ) = 100 + ( P + 5 ) ∙ P
2 ∙ P ∙ P - 2 ∙ P ∙ 5 = 100 + P ∙ P + P ∙ 5
2 P² - 10 P = 100 + P² + 5 P
Subtract P² to both sides
P² - 10 P = 100 + 5 P
Subtract ( 100 + 5 P ) to both sides
P² - 10 P - ( 100 + 5 P ) = 0
P² - 10 P - 100 - 5 P = 0
P² - 15 P - 100 = 0
The solutions are P = - 5 and P = 20
The present ages can't be negative so:
P = 20
J = P + 5 = 20 + 5 = 25
John´s present age = 25
Peter´s present age = 20
Proof:
Five years ago John was 25 - 5 = 20 yrs old , Peter was 20 - 5 = 15 yrs old.
2 ∙ ( J - 5 ) ∙ ( P - 5 ) = 100 + J ∙ P
2 ∙ 20 ∙ 15 = 100 + 25 ∙ 20
600 = 600