Let the present ages of P and Q be represented using the variable $x$. According to the given ratio 3 : 4:
After 6 years, their ages will increase by 6 years:
The problem states that after 6 years, the ratio of their ages will be 4 : 5. We can write this as an equation:
$ \frac{3x + 6}{4x + 6} = \frac{4}{5} $
To solve for $x$, we cross-multiply:
$ 5 \times (3x + 6) = 4 \times (4x + 6) $
$ 15x + 30 = 16x + 24 $
Now, rearrange the terms to isolate $x$:
$ 30 - 24 = 16x - 15x $
$ 6 = x $
So, the value of $x$ is 6.
The question asks for the present age of P. P's present age is represented by $3x$. Substitute the value of $x = 6$:
P's present age = $3 \times 6 = 18$ years.