Each salary pattern can be described with an expression that looks like:
starting salary + (annual increase) x (number of years)
Company A: 

Company B: 

You want to know when those two expressions will be equal.

The salaries from Company A and Company B will be equal after 10 years.