Remember that power is "the rate at which work is performed" and is therefore dependent on time, and so in a given time for a given displacement a piston does more "work" the faster it moves i.e. the higher the engine rpm. According to Wikipedia (I assume it to be correct), the S5 4.2 V8 develops 354PS at 7000rpm, whereas the RS5 4.2 V8 develops 450PS at 8250rpm. Even in the coarsest 'beer-mat' style calculation, 8250rpm is 18% higher and so could account for 63PS more. The rest would be done with other efficiencies.