United Rentals agreed to acquire Neff for $1.3 billion in cash, or $25 per share, winning a bidding war against H&E Equipment Services.