There's no direct ratio where x penetration equals y amount of extra damage.
Every 1 point of magic resist translates to 1% extra effective health against spells. The amount of pure damage reduction then depends on how much magic resist they have. Penetration alone cannot drop Magic Resist below zero. Magic Resist reduction (abyssal scepter, amumu, and fiddle passives) can, but the reduction from that happens before penetration kicks in AFAIK.
So if Champion A has 2000 health, and 100 Magic Resist their effective health against magic damage is 4000 - or a 50% reduction, causing an ability that deals 200 damage normally to do only 100. If you have 40 penetration, that 100 magic resist drops to 60, making the effective health of the champion 3200 against spells - or a 37.5% reduction in damage, which would cause the same 200 damage ability from before to deal 125. In this case 40 penetration means 75 damage, but that will change based on the level of Magic Resist you started with. 40 MR being reduced to 0, for example, only nets ~42 extra damage.