Can i swap engine and transmission (auto) from
2003 A6 Quattro 2.7T
into
2004 A6 Quattro 3.0

Do I also need to swap the rear end (if 3.0 tranny has different gearing than 2.7T tranny)?

Alternative:
swap
2003 A6 Quattro 2.7T auto
into
2001 Allroad auto
(I know rear diff needs to be swapped also, but possible aside from that? Drive shafts (front, center, rear)?