Answer:
Money with Mary = $28
Money with Vivan = $12
Explanation
Money with Mary = $ m
Money with Vivan = $v
If mary gave vivan $8 they would have same amount. $ 8 is reduced from Mary's amount 'm' and $8 is added to vivan amount 'v'
m - 8 = v + 8
m = v + 8 +8
m -v = 16 ----------------(I)
If vivan gives mary $8, then mary would have 9 times as much as vivan.
9(v - 8) = m + 8
9v - 72 = m + 8
9v - m = 8 + 72
-m + 9v = 80 --------------(II)
Add equation (I) and (II). Thus m will be cancelled and we will get the value of v
(I) m - v = 16
(II) -m + 9v = 80 {Now add}
8v = 96
v = 96/8
v = $ 12
Plugin v = 12 in equation (I)
m - 12 = 16
m = 16 +12
m =$ 28