Each salary pattern can be described with an expression that looks like:
starting salary + (annual increase) x (number of years)
Company A: [tex]24000+3000n[/tex]
Company B: [tex]30000+2400n[/tex]
You want to know when those two expressions will be equal.
[tex]2400+3000n=30000+2400n \\ 24000+600n=30000 \\ 600n=6000 \\ n=10[/tex]
The salaries from Company A and Company B will be equal after 10 years.