We can make this an equation, lets start with how much money he has. Since he bought the motorbike he lost 2,000, then sold it and received 2,500. The 2,000 cancels out but he still has 500. Now that he bought it for 2,200 we subtract 2,200 from 500 and get -1,700. Then finally, he sold it for 2,000 so we add that to -1,700 and get 300. His total profit was $300.
-2,000 + 2,500 = 500
500 - 2,200 = -1,700
-1,700 + 2,000 = 300