Question: I bought 2 copies of WoW when it launched, and gave one to a friend. He has since lost his CD key, and needs it to recover his account or some such. Unfortunately I didn't make a note of whose key was whose.

Is there any way I can determine which of the CD keys was used to activate my account? That way I can give him the other one.

Answer: 
Once a key is used, it is permanently associated with an account, but you won't be able to look it up anywhere:

> 
> **Should I keep my authentication key?**
> 
> 
> Yes, the authentication key can be
>  used to verify an account if other
>  information (such as the Secret
>  Question Answer) has been forgotten.
>  However, you do not need the
>  authentication key to reinstall the
>  game. After you have established your
>  account, the key is permanently
>  associated with your account but is
>  not available for disclosure by
>  Blizzard Entertainment.
> 
> 
> 

(Source: [Authentication Key FAQ](http://us.blizzard.com/support/article.xml?locale=en_US&articleId=20499).)

However, if he uses the wrong key, it'll simply tell him that the key has already been claimed. There are no negative consequences to using a wrong key, so give him both and one of them should work fine.

Edit: As @wikwocket pointed out, a potential downside is that your friend could become privy to your own key. If that's a concern, one way to guard against that could be to try a recovery process on your own account and input an account key -- if it goes through, it's yours and your friend has the other one. Or the other way around.
There is no existing method to discover your CD key. It is not stored in your account settings on Battle.net nor is it able to be extracted from the game files.

Your friend should be able to reset his account password or recover his account via Battle.net's [account recovery tools](https://us.battle.net/account/support/password-reset.html?ref=http%3A%2F%2Fus.battle.net%2Fen%2F). Alternatively, call support and ask them for assistance. They'll be able to give assistance aimed at the real issue (recovering the account) as opposed to trying to retrieve the CD key.