$44.80=($35+X)(1-0.3)
44.80 is the final total
You need to add the glove and hat cost to get a subtotal (35+x) and then multiply by what is left after the discount 30% off will leave 70% to pay, so in this equation 1-0.3 leaves 0.7 to multiply against the subtotal to get the total before tax of 44.80