Let the amount of money the first person and the second person having is x and y respectively
Noe, According to the question.
Also
Multiplying (2) by 2 we get,
Now adding (1) and (3), we get
Putting this value in (1)
Thus two friends had 40 Rs and 170 Rs respectively.