Question 514607
Let 
Present age of John = j
Present age of Mary = M

John is ten years older than Mary
j=m+10 .......(1)

Five years ago
j-5=m-5
then, John was double Mary's age
j-5=2(m-5)
j-5=2m-10
j=2m-10+5
j=2m-5
Put the value of j from (1) to above equation
m+10=2m-5
m-2m=-5-10
-m=-15
Multiply by (-1) both sides
(-1)-m=-15(-1)
m=15

Put the value of m in (1)


m=15

j=m+10 .......(1)
j=15+10
j=25

Present age of John = j = 25 years old
Present age of Mary = M = 15 years old