Pricing military aircraft isn't a simple matter. The initial cost of research and development (R&D) is often quite large, relative to the additional cost of purchasing the fleet of aircraft. In typical consumer markets (e.g. automobiles), the R&D cost is usually defrayed over many, many more units.
So, to compare costs, you need to decide whether you are burdening the cost of each aircraft with a pro-rated R&D cost. The F-35 is planned to be purchased in much greater quantities than F-22, so the R&D is defrayed over more planes.
Roughly $150M (marginal cost) per additional plane might be a reasonable number for each aircraft. Here's another source to justify that figure. I've certainly seen numbers that look a bit higher for F-22 than F-35A.
Here's the key, though: the military does not buy planes simply based on the "purchase price", nor should they. The lifecycle costs to acquire, maintain, replace, train pilots and crew on, and deploy military aircraft are huge. Any sane cost needs to include these, along with the R&D and fly-away cost. From the Wired article:
“Lifecycle cost” adds up the price of fuel, spare parts and
maintenance during the jet’s projected 40-year lifespan. The
Government Accountability Office estimates it will cost $59 billion to
fix and fly the F-22s until they retire. If you add unit cost and
per-plane lifecycle cost, you get the total amount the United States
spends to design, produce and operate a single Raptor: a whopping $678
F-35 lifecycle plus unit cost, assuming nothing else goes wrong? $469
million, according to Air Force figures quoted by the GAO.
So, the F-35 is expected to be notably less expensive, when you add it all up. This was a major design goal for F-35 (JSF) from the start. It was designed to be easier to maintain. F-22 was designed during a Skunk Works era, where maximum performance was always the top priority.
Civilians are not used to performing life cycle analyses on their purchases like this, but they certainly should be. In this respect, the military actually is a more savvy consumer (as strange as I know that sounds!).
Another major design goal of F-35 was to promote commonality between the aircraft purchased by each service (e.g. Air Force, Navy, Marines). F-35 starts to address that problem. F-22 does not. It shares virtually nothing with aircraft from other services. This is a logistics problem for the Dept. of Defense, and they recognize that.
Next, although it's easy to look at mechanical specs for the F-22, and say that it's as good, or better, than an F-35, we're not fighting the Soviet Union any more (with comparable MiGs and Sukhoi jets). Warfare is now more about information, and in general, a newer program is going to have newer, better software systems. Think in computing terms ... what kind of computers did you use when F-22 was designed?
Finally, at present, the F-22 production run has stopped and the factories have already been taken offline. So, there's a manufacturing hurdle that would be required to get F-22 production ramped up again, and that's not cheap for such a program.