First, stick to a track, it's the only legal way race side by side, and besides that it gives you a better chance and here is why.
The Merc is pretty much out except for driver reaction time which can be made up in a 1/4 mile time even if you're a second late on the gas.
The A4 is reported to run the 1/4 in 15.7 @ 88
The X1 28 is reported to run the 1/4 in 15.0 @ 90.
I also wouldn't trust either of these numbers because every BMW and Audi engines vary in performance. It's a whole other subject on why but in short, they do. The driver can also matter, though in an automatic it's less likely but everything from track surface and weather conditions to items in the car and a 150lb vs 300lb driver can effect results by a half second and we have no specifics with those times, and besides, they're car reviews and that gives them even less credit IMO.
Looking at the enginen specs, the A4 is 210hp 258lb/tq and the X1 28 is 240hp 260lb/tq. This means it's probable that the longer the run, the better off you'll be with a little more HP (if it's there on your engine) but an X1 has a higher drag coefficient than the A4 so that's a downside at higher speeds.
The X1 28 N20 engine has a wider power band than the A4's 2t (My wifes last two cars have had the 2T and I know that engine well) and the X1 28s ZF 8HP transmission shifts faster and will give you better use of the N20's power band. The X1 28 would actually have a bit faster 0-60 on paper except that it has to switch to third around 56MPH which hurts the time a bit while the audi will still be in second at 60mph, but it switches to third probably around 67 if I'm remembering correctly.
I don't think Quatro vs xDrive will play a whole lot into things, if anything I believe the xDrive loses a little less hp to the wheels but I've never seen actual numbers -- this is somewhat related to why quattro will do better in some snow/traction conditions than an xDrive bmw just fyi.
I can think of 5 factors though that could win or lose you the race, only one of which you can control. It's probable that you'd win.
Let us know how things go, but go to a track please.
EDIT: Just got thinking and checked, the 2013 A4 does have the same ZF 8HP transmission as the X1 28, so throw out my comment about when the A4 shifts, it will be a bit closer in that area. Also, I believe there are reports that not manually shifting the paddles to switch gears results in faster acceleration. I'd recommend you read up on the ZF 8HP transmission though.
Last edited by edx1; 11-29-2012 at 12:37 PM.
Reason: Added last comment about A4's transmission