Reposting as an answer is great — but no excuse for plagiarism
###Reposting as an answer is great — but no excuse for plagiarism ### I'veI've reposted other people's comments as answers many times. I do this because that's where answer-like content should go — in answers, not comments.
But I always make sure to make it a community wiki answer. That way there's no taking credit for someone else's contribution. (Votes and acceptances on community wiki answers don't count toward anyone's reputation.)

(To illustrate the point in a meta way, I made this answer you're reading right now a community wiki.)
Now to answer your question more specifically
What can you do about your situation after the fact? Not much, I'm afraid. Except leave a comment appealling to the answerer's conscience to make it community wiki, or at least give you full attribution. Other than that, learn your lesson and move on.