If $42 is the value before tax, then you can find how much you spend on tax as follows:
Then you spend $2.52 on tax, and the total will be 42+2.52= $44.52.
But if 42 is the value including tax, then you can find how much you spend on tax as follows:
Then you spend $2.38 on tax and for the sale: $42-$2.38=$39.62