Fred Smith bought a used car for £4,000 and sold it to Alice for £5,000. Fred later bought it back for £6,000 and then resold it to Alan £7,000. How much profit did Fred make?
Imagine Fred started with £20,000, after buying the car he would have had £16,000. He then sold it to Alice, which left him with £21,000 and then bought it again leaving him £15,000. Fred finally sold it again leaving him with £22,000. So Fred's profit was £2,000.
Alternatively, you can see that Fred spent a total of £4,000 + £6,000 = £10,000 and received a total of £5,000 + £7,000 = £12,000. A difference of £2,000.