I am assuming ratio of their present ages is 3:4.
P's present age is 3x years and
Q's present age is 4x years
And, TEN years ago, P was half of Q's age.
then, P = 1/2 Q or,
Q = 2P
∴ Ten years ago,
(3x−10) = (1/2) * (4x−10)
=> 6x-20 = 4x-10
=> 2x = 10
=> x = 5
∴ P's present age is 3x = 3*5 = 15 years
and, Q's present age is 4x = 4*5 = 20 years
The total of their present ages is = 15 + 20 years
= 35 years