Suppose that,
The present age of Ram=xyears
The present age of Raju=yyears
x+y=31......(1)
Now, 3 years ago
x−3=4(y−3)
⇒x−3=4y−12
⇒x−4y=−9......(2)
From equation ( 1) and ( 2) to, and we get
Then, x=23,y=8
So,
Ram’s age =23year
Raju’s age=8year
Hence, this is the answer.