Answer: 3.5 years
Step-by-step explanation: Let A be the salaries earned from company A for x years and B for company B for the same years.
A = 31000 + n*3000
B = 38000 + n*1000
To find the case where A = b, set them to each other and solve for n, the number of years.
31000 + n*3000 = 38000 + n*1000
2000n = 7000
n = (7000/2000) = 3.5 years.
A B
0 31000 38000
1 34000 39000
2 37000 40000
3 40000 41000
4 43000 42000
5 46000 43000
6 49000 44000
7 52000 45000