Jessica Cam W.
I assume you used the “Import Mail and Contacts” and/or the “Check mail using POP3″ options in Gmail Settings > “Accounts and Import”. You’ll need to stop Gmail from checking your Yahoo Mail via POP3 and/or remove your Yahoo account in those sections to have Gmail not import or get your Yahoo Mail any longer.
As far as the messages that are already in Gmail and you want back in Yahoo, you can transfer them two ways: Applying a forwarding filter, or using a desktop mail client like Thunderbird to bulk move them back to your Yahoo Mail account.
For method 1, first, go to Gmail Settings > “Forwarding and POP/IMAP” tab. Click on “Add a Forwarding Address” which is
first section, and type your Yahoo email. You’ll need to go to your Yahoo Mail account to verify that it is your account. Then, back at gmail.com, select all the conversations that you want to send to Yahoo, then click on “More Actions” next to “Labels”, and choose “Filter messages like these” from the drop-down menu. You’ll get a simple wizard to indicate what you want the filter to do. Click Next and just make sure you check the “Forward it to: [Your Yahoo address]” and the “Also apply filter to X conversations below” options before clicking on “Create Filter”. It might take a day or two to get everything in your Yahoo Mail account.
The second way, involving a desktop mail client, is described here .