To solve this problem, we can use algebraic equations. Let's say that the number of weeks it takes for Ted and Carly to have the same account balance is "w".
Ted's account balance after "w" weeks can be represented by:
300 + 4w
Carly's account balance after "w" weeks can be represented by:
16w
We want to find out when their account balances will be equal, so we can set these two equations equal to each other:
300 + 4w = 16w
Simplifying this equation, we get:
300 = 12w
Dividing both sides by 12, we get:
25 = w
Therefore, it will take 25 weeks for Ted and Carly to have the same account balance.