Fred is 25 years older then Bill
f=b+25........(1)
In 5 years times
Fred will be = f+5 years old
Bill will be = b+5 years old
Then
Fred will be twice as old as Bill
f+5 =2(b+5)
f+5 =2b+10
f=2b+10-5
f=2b+5..............(2)
Put the value of f from (1) to (2)
b+25=2b+5
b-2b=5-25
-b=-20
Cancel out (-)
b=20
Put the value of b in (1)
f=b+25........(1)
f=20+25
f=45
Present age of Fred = f = 45 years old
Present age of Bill = b = 20 years old