Johnyen,
Are you trying to format the output or are you asking how to get the correct result?
I think the way you are doing it is not correct. You are calculating VAT on the already added VAT.
You need to multiply your total price by 1/1.175 to calculate the original total price.
e.g.
total = 1000
original_price = 1000 * 1/1.175
VAT = total - original_price
Format it using sprintf or number_format (after doing the calculation).
HTH
rinjani