I have a very strong feeling that such a debate will imminently ensue in this thread. It may be to our advantage for you to elucidate this, you're a word of authority on logic in this forum.
Either you think that reasons figure into the rightness of an action, or you don't.
If you think that reasons figure into the rightness of an action, either you think that they exhaustively determine the rightness of that action, or you think that they are at least a factor in determining the rightness of that action.
If you think that they exhaustively determine the rightness of an action, the phrases "right thing for the wrong reason", and "wrong thing for the right reasons" are nonsensical (i.e. they describe logical impossibilities).
If you think that they are at least a factor in determining the rightness of an action, then "right thing for the wrong reason"
must be such a case where whatever figures into the rightness of the action that isn't reasons overrides the wrong reasons to make the action, all things considered, right. Similarly, "wrong thing for the right reasons"
must be a case where whatever good reasons you act upon are overridden by the non-reasons wrong-making features of the action. Since a wrong action is by definition worse than a right action, then, "right thing for the wrong reasons" is better.
If you think reasons don't figure into the rightness of the action, then whether or not the action had certain reasons associated with it is irrelevant to whether it is the best action. In this case, then, we defer to the fact that a right action is by definition better than a wrong action, and again, we find that "right thing for the wrong reason" wins.
These options (the ones I lay out above) are logically exhaustive. Thus, anyone who doesn't think that the two options (the original two that you ask us about) describe literal impossibilities is forced to the position that "right thing for the wrong reasons" is better. And no matter what your view, you cannot say that "wrong thing for the right reasons" is better. At best, you can just call the question incoherent.