It triples every day, so at the end of day 5 you have 50*3 ants, end of day 10 you have 50*3^2 ants, day 15 you have 50*3^3 ants.
In general, after N days you'll have 50*3^(N/5) ants.
So you need to solve for N in:
500,000 = 50*3^(N/5)
therefore 10,000 = 3^(N/5)
therefore N/5 = log_base3(10,000)
so N/5 = 8.38
therefore N = 41.91 days. you should round this up to 42 days.