Say x is the number of weeks until their money is equal. Then, we can set up an equation.
400 + 25x = 250 + 75x
Subtract 250 from both sides
150 + 25x = 75x
Subtract 25x from both sides
150 = 50x
Divide by 50 on both sides
3 = x
That means the answer is 3 weeks.