Dealer rip off? Or is he right?

We bought a Ford F150 2005 from a local dealership a few months back, after1 week, the truck had engine problems. Before taking it back, my husband took the vehicle to a Ford dealer and they printed out the error codes. We took it back, dealer was upset with mechanic, told us he paid him a lot of money to fix it and that he apologized. He took the vehicle and gave us a courtesy vehicle for the meantime. We ended up not hearing from him for over two weeks, but then finally got it back, he showed us a receipt for $3000 and we got our truck back at no charge. We felt like he handled the situation really well. At that time there was extensive engine work done to it and they told us that they've done an oil change. I quickly realized our ac now wasn't working, and filled up the freon myself. So I assumed the mechanic simply forgot about it. And with them handling everything else well, we did not complain. 3 months later, same problem starts Again. We call the dealer, he says bring it in, he'll take a look at it. Husband went to Ford dealer again before dropping it off, read out error codes, same exact problem (plenty of engine misfires). He gave us a courtesy vehicle and we did not hear from him for 3 weeks. So now he called, said it's our fault, because we did not get an oil change done. We told him, that he did get one done and that we haven't driven it for 5000 miles since. He says they never changed the oil and that the mechanic only put a "temp" oil inside? Say what?

Say you do not know how to purchase a vehicle.
Before closing the deal, you have an independent good mechanic analyze the vehicle to find everything that is wrong with the car and the condition of parts.
If that is not possible, you instead get a rock solid warranty and have it done just after you buy the car, and return it if not in the expected condition.
A 2005 vehicle is 9 years old and a possible nightmare of issues.
"Dealer upset with mechanic" - It is the dealer's mechanic. What do you care?
"Paid him a lot of money" - Not relevant
"Receipt for what it cost him" - Not relevant
You bought a piece of junk from an untrustworthy dealer.
There was either a guarantee, or try to sue on warranty of fitness based on his expertise assumed by the courts, or it is your problem.
Values of a 2005 F150 varies a lot.
Always appraise it first, and get whatever history is available
http://www.edmunds.com/appraisal/
I would never buy a used car without having it checked first independently.

There's no such thing as "temp oil." File a complaint with the Better Business Bureau and the State Attorney as to this dealership. It will not help you but it might help others. Sadly, this happens by the thousands each day primarily to kids with little money buying very used cars with over 150,000 miles. Do remember, auto dealerships that sell used cars can only know or do so much for the trade in vehicles they sell as used cars. As to why you need a truck, well, I'm of the opinion that trucks have commercial value or have utility purposes such as towing or carrying cargo. Too many use these vehicle as status symbols. One kid, 16 years old, just asked about a Lincoln Navigator for his first car. What? A kid driving a 9 MPG gigantinourmous car to high school? Sadly, it happens. Sorry but you seem to be out of the money and out of a vehicle. I hop you can sort this out as best possible.

Despite everything you read and hear you still seem to think there's an honest auto dealer somewhere, the ONLY way to get good service from dealers is to know more than they do or take someone with you who does

It sounds like he's tired of repairing it and is now making up lame excuses. For the sake of your sanity, go ahead and trade the truck in. It's not any good.