Let 10 yr ago, ages of Ram and Rahim were k yr and 3k yr, respectively.
Then, present age of Ram = (k + 10)
and present age of Rahim = (3k + 10)
According to the question, (k + 10 + 5) / (3k + 10 + 5) = 2/3
⇒ 3k + 45 = 6k + 30
⇒ 3k = 15
∴ k = 5
Hence, required ratio = (5 + 10) / (3 x 5 + 10)
= 15/25
= 3 : 5