a discount is similar, except instead of adding you will subtract, so a 40% discount would be ( 1 - .4 ) or ( 0.6 ), multiplying your total by .6 will give you your discount price
Now, lets look at your question specficially
$256.50 with a 40% discount, so multiply
(256.50) * (1 - .4) simplify and you have (256.50)*(0.6) = $153.90
$102.60 with a 6% shipping cost, so multiply
(102.60)* (1 + .06)simplify and you have (102.60)*(1.06) = $108.76
To get the out od state tax, add the two items together, and multiply by the tax rate using the same method as shipping ( 1 + .07 )
( 153.90 + 108.76 ) * ( 1.07 )
( 262.66 ) * (1.07) = $281.04 ( this is your total )