Calculate discount, tax, and final price with small functions.
You are calculating the final price for a product after discount and tax. The discount is applied first, and tax is calculated on the discounted price.