Given the task definition and input, reply with output. The task is to generate the correct answer for a given math problem.

Problem: 8 years ago , p was half of q ' s age . if the ratio of their present ages is 3 : 4 what will be the total of their present ages ?
28