Let the capitals be ‘a’ and ‘b’.
Given, one says, “give me hundred, friend! I shall then become twice as rich as you” .
Lets assume "b" gives hundred to "a".According to given condition
a+100=2(b–100)⇒a+100=2b–200
a=2b−200–100
a=2b–300
a−2b=−300------ (1)
Now The other replies, “If you give me ten, I shall be six times as rich as you.”
Which means "a" gives 10 to "b".
So,
b+10=6(a–10)⇒b+10=6a–60⇒b=6a–60–10
b=6a–70
6a−b=70 ----- (2)
Multiplying eq1 by 6 and subtract from eq2
6a−b−6(a−2b)=70−6(−300)
6a−b−6a+12b=70+1800
11b=1870
b=170
substitute the value of b in eq 1 to get,
a−2(170)=−300
a−340=−300
a=−300+340
a=40
The amount of their respective capital is Rs 40 and Rs 170.