How much is it worth? When I appraise a base one, the trade-in value without any options for my zip code is around $6,000.
And you need more work done, and Audis seem to have a reputation of needing "frequent" expensive repairs.
The car dealer guy can do the labor "free" on the side and may already have a used engine sitting around taking up shop space. So selling you another car clears one out of the inventory and then the fixed up Audi A4 could be sold. My guess is that his profit margin is higher getting you into another car.
I like keeping my cars forever but since you need a transmission at some point too, I think I'd trade it.