Let A be Ravi's age and let B be Ranu's age, we have:

To solve this, we can jsut sub A for 2B and solve for B (which is good since the problem asks for Ranu's age, which is B), so:

We only had to consider the positive solution since age cannot be negative. With that we know that Ranu's age is 6 and Ravi's age is 12.