Step 1: Define present ages directly.
Let John's present age be $a$ and his grandfather's present age be $g$.
Step 2: Translate '5 years ago' into an equation.
Five years ago, John was $a-5$ and the grandfather was $g-5$. Since the grandfather was five times as old then, $g - 5 = 5(a-5)$, which gives $g = 5a - 20$.
Step 3: Translate '25 years from now' into an equation.
In 25 years, John will be $a+25$ and the grandfather will be $g+25$. Since the grandfather will be twice as old then, $g + 25 = 2(a+25)$, which gives $g = 2a + 25$.
Step 4: Solve the two equations together.
Setting the two expressions for $g$ equal: $5a - 20 = 2a + 25$, so $3a = 45$, giving $a = 15$. Then $g = 2(15) + 25 = 55$.
Step 5: Form the ratio.
John's age to grandfather's age $= 15:55 = 3:11$, the same result as before.
Final Answer:
The ratio is 3:11.
\[ \boxed{3:11} \]