Between F35 and F22 the cost comparison ratio is 1.23 and a capability ratio is 2.8.Also both aircraft costing about the same over the 2011-2018 time frame.
Some advantages of F22 on F35 are
1)F-22A carries twice as many Air-to-Air missiles as the F-35A
2)In combat, the F-22A is flown at almost twice the altitude and twice the speed of the F-35A. This increases the range of the F-22A's Air-to-Air missiles by almost 40 percent, increasing lethality, while it doubles the range of guided bombs like the JDAM.
3)The higher speed of the F-22A vs the F-35A allows it to control twice the area, when targets are mobile and time sensitive. In such situations, a single F-22A can do the same work as two F-35As.
4)F-22A is much more lethal than the F-35A. It is also much more survivable than the F-35A.
5)F-22A provides around three times more capability than the F-35A, yet costs only around 23% more per unit.
6)F-22 is currently in production, yet the planned Initial Operational Capability for the F-35A is 2013 and this is at the Block 3 configuration level, with the prospect of further schedule slippages with commensurate increases in cost.