Let the present ages of Rahul and Haroon be 5x years and 7x years respectively.
Four years later
age of Rahul = 5x + 4
age of Haro = 7x + 4
According to condition, (5x+4)+(7x+4) =56
⇒12x+8=56⇒12x+8−8=56−8 [Subtracting 8 from both sides]
⇒12x=48⇒12x12=4812 [Dividing both sides by 12]
⇒x=4
Hence, present age of Rahul =5 x 4=20 years and present age of Haro = 7 x 4=28 years.