You receive two job offers:

Job A: $39,000 starting salary, with 4% annual raises
Job B: $41,000 starting salary, with 3% annual raises

How many years will it take for your salary at job A to exceed your salary at job B?

A will catch up to B after x years when

39 * 1.04^x = 41 * 1.03^x
(1.04/1.03)^x = 41/39
x log(1.04/1.03) = log(41/39)

x = log(41/39)/log(1.04/1.03) = 5.176 years