You cannot unlock Rock Band 2 songs for free export to Rock Band 3. The export process (available for a limited time via a paid export code) transferred on-disc RB2 songs to RB3.
DLC songs must be purchased separately for each game. RB3's Music Store, PlayStation Store, Xbox Marketplace, and Nintendo eShop handle purchases per platform—no cross-game DLC transfer.
If you missed the export window (ended ~2011), on-disc RB2 songs are unavailable in RB3. DLC purchases are platform- and game-specific.