Are you saying that your 1099-R had two states listed in boxes 14 through 16?
If so, the payor of the 1099-R has already sent the money to those two states. The only way you can get your withholding back is by filing a non-resident tax return in the state that you did not live in and show that that income was not income for that state.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"