Step 1: Set up variables for 5 years ago.
Let John's age 5 years ago be \(x\) years. Since the grandfather was five times as old at that time, his age 5 years ago was \(5x\) years.
Step 2: Write both ages 25 years from now.
From '5 years ago' to '25 years from now' is a gap of 30 years. So John's age 25 years from now is \(x + 30\), and the grandfather's age 25 years from now is \(5x + 30\).
Step 3: Use the second condition to form an equation.
The grandfather's age then is twice John's age then, so \(5x + 30 = 2(x + 30)\). Expanding, \(5x + 30 = 2x + 60\), so \(3x = 30\), giving \(x = 10\).
Step 4: Find present ages.
John's present age \(= x + 5 = 15\) years. Grandfather's present age \(= 5x + 5 = 55\) years.
Step 5: Form the ratio.
Ratio of John's age to grandfather's age \(= 15 : 55 = 3 : 11\).
Final Answer:
The ratio of John's age to his grandfather's age is 3:11.
\[ \boxed{3:11} \]