.
The sum of Paul and Peter is 24 .
Five years ago their respective ages were in the ratio 3:5.
How old will they be in three years' time?
~~~~~~~~~~~
First, please look how I edited your post to make wording perfectly rounded.
Secondly, I will show you right now that the posed problem HAS NO solution in integer numbers.
Indeed, five years ago the sum of their ages was 24 - 5 - 5 = 24 - 10 = 14 years
and their respective ages were in the ratio 3:5 <<<---=== according to your condition (!)
But it is ABSOLUTELY CLEAR that such integer numbers DO BOT EXIST.
Therefore, your problem is a FAKE.
------------
Please accept my deepest condolences.