Donaldson is better but my question right now is who say Donaldson will sign for 3 years? Plus I am not sure Donaldson will produce 4.5 or 5 war for the length of that contract.
Plus you can sign or trade for Ozuna or Marte.
He doesn't have to be worth 4.5 or 5 WAR per season. $25 mill is around 3 WAR. So let's say he manages 4 the first year, 3 the second, and only 2 the third, it's a breakeven deal overall.
Longo, OTOH, is due more than 7 WAR in salary, and you would have to be wildly optimistic to believe he can manage even 5. Around 3 (all three years combined) is far more likely.