Ethan had $12 more than Dakota. Ethan then gave 1/3 of his money to Dakota. The ratio of money Ethan had to the amount of money Dakota had then became 5:7. How much money did Ethan give to Dakota?

e = d+12

(2/3 e)/(d + e/3) = 5/7

Ethan gave Dakota $10