I bought a book at RM8.
After I read it, I sold it to my Alex at the price of RM9.
But, I regretted and purchased from Alex at RM11 again.
Thereafter, I sold it to Alvin at RM12.
So, how much did I earn or loss?
Answer: RM2 profit
Let's assume that I have RM10 at the beginning.
Bought at RM8: RM2 left.
Sold at RM9: RM11 left.
Bought at RM11: RM0 left.
Sold at RM12: RM12 left.
I got RM12 now.
Comparing to RM10 that I have at the beginning,
I earned RM2.