Write an equation for scenario

Elsa has three times more money than Ellie. If Elsa gives Ellie five dollars they will have the same amount of money. How much money did each have ?

Let's denote the amount of money that Ellie has as E and the amount of money that Elsa has as 3E.

After Elsa gives Ellie five dollars:
3E - 5 = E + 5

Solving this equation, we get:
2E = 10
E = 5

Therefore, Ellie had $5 and Elsa had $15.