Question 583512
Let 
Present age of John = j
Present age of Peter = p
Present age of Alice = a

Given
======
John is twice as old as his friend Peter
j=2p............(1)
Peter is 5 years older than Alice
a=p-5.............(2)
In 5 years
John will be = j+5
Alice will be = a+5
Then
John will be three times as old as Alice
j+5=3(a+5)
j+5=3a+15
j=3a+15-5
j=3a+10..........(3)
Put the value of 'a' from (2) to (3) and value of 'j' from (1) to (3), we have
2p=3(p-5)+10
2p=3p-15+10
2p-3p=-5
-p=-5
Cancel out (-)
p=5
Put the value of p in (1)
j=2p
j=2(5)
j=10
Put the value of j in (3)
10=3a+10..........(3)
10=3a+10
10-10=3a
0=3a
a=0

Present age of John = j = 10 years old
Present age of Peter = p = 5 years old
Present age of Alice = a = 0 years old (Alice is under 1 year old)