You can
put this solution on YOUR website!Let x represent Peter's age. Then x+7 is John's age
x = x+7 (First equation)
Next it says if 13 is added to John's age : x+7+13
5 is substracted from Peter's age: x-5
Let's set up the equation so far:
Peter's age = John's age
x-5 = x+7+13 And it says that under these conditions John will be twice as old as Peter:
2*Peter's age = John's age
2(x-5)= x+7+13 (second equation)
2(x-5)= x+20 Now let's simplify the left side
2x-10= x+20 Add 10 to both sides
2x-10+10 = x+20+10
2x = x+30 Substract x from both sides
2x-x = x+30-x
x = 30
Therefore,
x+7 = 30+7 = 37
So, Peter's age is 30 and John's age is 37.
Let's check it by substituting the variables of the second equation.
2(30-5) = 30+7+13
2(25) = 50
50 = 50
I hope this helps.