

Let 7 years ago,
Age of Swati = x
So, age of Varum = 5x2
Now, present age of Swati = x + 7
and present age of Varun = 5x2 + 7
Again given that 3 years hence, age of Swati will be 2/5 of age of Varun
x + 7 + 3 = (2/5)*(5x2 + 7 + 3)
=> x + 10 = (2/5)*(5x2 + 10)
=> 5(x + 10) = 2(5x2 + 10)
=> 5x + 50 = 10x2 + 20
=> 10x2 + 20 - 5x - 50 = 0
=> 10x2 - 5x - 30 = 0
=> 2x2 - x - 6 = 0 {divided by 5}
=> 2x2 - 4x + 3x - 6 = 0
=> 2x(x - 2) + 3(x - 2) = 0
=> (x - 2)*(2x + 3) = 0
=> x = 2, -3/2
Since age can not be negative,
So, x = 2
Now, present age of Swati = x + 7 = 2 + 7 = 9 years
and present age of Varun = 5x2 + 7 = 5*22 + 7 = 5*4 + 7 = 20 + 7 = 27 years
