V10 in a B5 A4...
Maybe with a custom front panel and some massaging of the firewall it might be possible in a D2. There's more room behind the engine in the B5 so it can all be moved back a bit, but the engine bay is shorter in the front compared to the D2.
When I measured a D2 and D3 side by side I thought it was a pretty conclusive 'no', but maybe I need to measure again