If you forgot your Yahoo password, there are two ways for you to reclaim it.
This is the most used way for people forgetting their Yahoo password, and it's very easy. The only condition is that you should have a valid alternative email address or the answer to your security question. If you don't have any of them, you need to swich to the second way.
First, get Yahoo password restore tool here: Wondershare WinSuite 2012, an amazing program that can help to get back Yahoo password in 3 steps.
Install and launch Winsuite on your computer, and then go to "Password & Key Finder" menu. Click "Password Finder" button in the center to begin finding your forgotten Yahoo password.
Click "Next" to restore Yahoo password.
Here, you can find out and export your Yahoo Messenger password stored in the source computer as a special cipher file. With this file, you can log in your Yahoo Messenger on any other computer without entering password. All you need to do is just to copy this cipher file to any place of the destination computer and click Restore Password Data. After you've enbled Yahoo Messenger, you can log in it directly.