y = 10x + 50
y = 15x + 30
where y = the amount of money in their account and x = the number of months.
Because "10x+50" is equal to y, and "15x+30" is also equal to y, it must be true that "10x+50" is equal to "15x+30". Then solve for x:

Now that you have x, you can plug it in to one of the equations to find y:

So x = 4 and y = 90. Therefore...
After 4 months, both accounts will have the same amount of money; $90.