The books you bought using the Kindle App will be in your Kindle account - you can simply re-download them onto your Kindle. The Kindle will display a home page item called "Archive" which contains everything that you've bought but not downloaded to that device. Just open the archive, and select the books you want to download to your new Kindle.
I'm afraid that books bought in the iBookStore can't be transferred elsewhere. Best to avoid that store - it "locks you in" to iBooks. Sorry!