A ship's captain and his ship together are 63 years old. When the captain is twice as old as the ship is now, then the ship will be exactly three times as old as the captain was when the ship's age in years was the square root of the captain's current age. How old is the captain?
Let $x$ denote the current age of the ship's captain, and $y$ the age of the ship (naturally, in years). Let $3z$ be the age of the ship when the captain is $2y$ years old. According to the problem, the captain was $z$ years old when the ship was $\sqrt{x}$. Reviewing the three time points and their corresponding ages:

|  | "now" | "future" | "past" |
| :---: | :---: | :---: | :---: |
| captain | $x$ | $2y$ | $z$ |
| ship | $y$ | $3z$ | $\sqrt{x}$ |

We know that $x + y = 63$. Furthermore, it is evident that the difference in age between the captain and the ship is constant, i.e.,

$$
2y - 3z = z - \sqrt{x} = x - y
$$

From these relationships, we can derive an equation for $\sqrt{x}$. Adding the equations $x + y = 63$ and $x - y = z - \sqrt{x}$ and solving for $z$,

$$
z = 2x + \sqrt{x} - 63
$$

Comparing this with $2y - 3z = x - y$,

$$
y = \frac{x + 3z}{3} = \frac{7x + 3\sqrt{x} - 189}{3}
$$

Finally, using the equation $x + y = 63$,

$$
x + \frac{7x + 3\sqrt{x} - 189}{3} = 63
$$

Rearranging,

$$
10x + 3\sqrt{x} - 378 = 0
$$

The left side can be easily factored: $(\sqrt{x} - 6)(10\sqrt{x} + 63)$, from which, given $\sqrt{x} \geq 0$, only $\sqrt{x} = 6$, or $x = 36$, is a valid solution. Therefore, the captain is 36 years old, and the ship is 27 years old. This is indeed a correct solution, and as we have seen, the only possible one.

Based on the solution by Bajszi István (Bonyhád, Petőfi S. Gymnasium, 2nd grade).