HSA information in box 12 and 14

My employer included the following information HSA information in my W-2, and I'm confused as how to report it into my return.

Box 12: Code "W" and amount 500.00

Box 14: EE HSA  2999.95

 

Should I include the 500 as my employer contribution to the HSA (box 9) and 2999.95 (box 2) of the form 8889? or should I include all in box 9 and nothing on box 2 since the contributions were reported in my W2?

 

I tried both, and there seems to be a big difference in the tax return, but I'd like to know what would be the correct way of reporting it.

 

Edit: I used the wrong code of box 12 in my initial message, it was not "D", but "W".