We need more F22's, but the F22 wasn't designed for the F35 role and trying to morph it would certainly reduce it's positive aspect.
The cost comparison suffers from including original cost of the aircraft, I did not see opposing costs to refurbish existing airframes to extend their life or capabilities...but most all government cost estimates are bogus so what's new?
From experience I'd assume that most cost increase results from (a) government adding hundreds of nit-noi little changes that amount to another half of the cost, (b) manufacturer/supplier unwillingness to step up to the full costs of the original bid as well as the combined impact of "little" changes, and (c) the basic idea of designing a USAF/USN common fighter.
P39 was a hot rod until the feds added all their bells and whistles...
Warhawks and Hurricanes were sub standard warplanes before they saw combat, but imagine winning that war without either one(!)
Was the F105 a junker that was merely pressed into two specific missions because it was there, or was it the only thing available at the time that could survive those missions?
Same question applies the the F/B111, and it adds the F35 parallel of having blown billions failing to navalize it before finding a land based home.
All of the above were transitional, old giving way to new, the F35 is likely also a transitional aircraft but can we afford to wait out the next generation?
I think the bottom line is that the F35 should provide an attack capability lacking in the F22, F35 is not an A10, but it's closer than the '22 (and AF is genetically opposed to ground support anyway), and when the balloon goes up a slight edge is way better than a gaping hole.