Purgatory, Praying for the Dead and 2 Maccabees

Could you speak on 2 Maccabees 12:43-46 and where Catholics get the idea of purgatory/ praying for the dead? Also if you could touch on the difference between the Catholic/ Lutheran cannons that would be helpful.