Weight is the deciding factor in this fight.
Just in terms of power, these two seem very similar. The BMW produces 626 horsepower (467 kilowatts and 553 pound-feet (750 Newton-meters) of torque from a 4.4-liter twin-turbo V8. The Audi has 592 hp (441 kW) and 590 lb-ft (800 Nm) from a twin-turbo 4.0-liter V8. Both are all-wheel drive.
The major differentiating factor is weight. The M5 CS is 4,189 pounds (1,900 kilograms), but the RS7 is a heftier 4,718 pounds (2,140) kilograms. As you might expect, 529 pounds (240 kilograms) makes a significant difference in a drag race. For the full story and video, check out this article from Motor 1.