Depends, they are quite comparable, and i don't thnik you would go wrong with either of them. Dzeko has average stamina though which might not suit the prem, but he is 6'4 of Bosnian goal machinary. Cavani can play on the right, but Dzeko has superior first touch, and arial ability. but Cavani has 1st class stamina, and could be used in conjunction with Dzeko or Rooney. also very good finisher.
I'd go for Dzeko because he's more what Utd need imo and would compliment Rooney better. Just scout them and decide.