Not a bad play, you were sitting at 3x the blinds, however you were raising into a raised pot, meaning you were raiseing into someone with a good hand (or represented good hand), this isn't advisable. I will generally wait until I have an unraised pot to push. Plus you left yourself with only 1 chance to win..cards.. he isn't going to fold to a 500$ raise when he already pumped 2k.