You almost never get back the cost of home repairs or improvements in an increased selling price. If you were planning on putting the house up for sale tomorrow, I'd say no way replace the A/C. No buyer says, "I was willing to pay $150,000 for this house. But they just replaced the A/C? Oh, that's a $3,000 unit, so I guess I'm willing to pay $153,000." That's just not how people think.
This page, http://time.com/money/3703939/home-improvements-return-on-investment/, lists various types of home improvements and compares their costs to what realtors estimate they add to the value of the house. Notice something interesting? NONE of the items pay back 100%. The best increase the sale value by about 80% of the cost.
The only things where you're likely to get your money back are things that are low cost and very visible. Like painting, repairing holes in the walls, maybe replacing stained carpet, that sort of thing.
The far easier and safer thing to do is to be willing to make concessions. If a potential buyer says, "Hey, I like the house, but this A/C unit really needs to be replaced, and that will cost $3,000!" You can always say, "Okay fine, at closing we'll include a $2,000 allowance toward the A/C." You can usually get the buyer to agree to accept less than the full cost.
When I was young I bought a house with a leaky roof. I barely had the cash for a down payment, never mind to reshingle the roof immediately after buying. So I made a deal with the seller that they'd reshingle the roof, but we increased the sale price so that I was really paying about half the cost, and then that increased price was just part of the mortgage. I think that sort of thing is fairly common.
Now you say you're not planning to sell for another 2 or 3 years. So then the question becomes, how much benefit would you get for yourself from a new AC unit in 2 or 3 years, added to any increased sale price. Presumably you'd save the cost of freon re-charges. Maybe the AC would work better and the house would be more comfortable. It's very difficult to put a price on that.
I make improvements to my house based on the perceived value to me. I generally count $0 for increased sale price. I figure I'll probably live here at least another 5 years, so will I get my investment back in 5 years? Most of it is intangible, like I recently had a new bathtub put in because the old bathtub was ugly and disgusting looking. It doesn't save me any money, but it just makes the house nicer to live in.