EVERYONE who has received or seen an email from you through that Yahoo accound KNOWS YOUR USERNAME.
As far as "hacked my password to a yahoo email account I use", a dictionary attack could have been used or simply a lucky guess.
What exactly makes you think your password was actually "hacked"? If it is because you got back an email that you never sent that was maybe rejected because the recipient was unknown, that is a common result of a spammer just using your Yahoo (or other provider) email username while spoofing. You get it because your account is genuine so it accepts the return. The COMPLETE header info of the email would show where it actually originated.