Let initially Kevin had x dollars and Danny had y dollars. The initial sum of money is $200 therefore,
x + y = 200 (1)
Kevin gave 2/7 of his money to Danny. So, amount of money Kevin gave to Danny is 2x/7. The Danny total money was y + 2x/7
dollars and Kevin's money was x - 2x/7 = 5x/7 dollars.
The amount of money Danny had = y + 2x/7 (2)
After taking money from the Kevin the Danny had 4 times as much money as Kevin therefore the Danny had 4 (5x/7) dollars.
The amount of money Danny had = 4(5x/7) (3)
Combining both (2) and (3)
It gives,
y + 2x/7 = 4(5x/7)
Solve the equation for x
2x/7 = 20x/7 - y
2x = 20x - y ⋅ 7
x = 7y/18
Substitute x = 7x/18 in (1) and solve for y.
7y/18 + y = 200
7y/18 ⋅ 18 + y ⋅ 18=200 ⋅ 18
25y=3600
y=144
The Danny had $144 at first.