The last price of a product previously purchased by the customer

How do I know the last price of a product that the customer has already bought quickly while reselling the same product?

You don’t. You will have to look at past sales invoices.