Well, they aren't really comparable because one is a multirole fighter and one is built to be a very fast interceptor. It's like comparing apples to oranges, but for some reason it's an accepted rhetoric.
To further expand, the F-35 (while hilariously overbudget, and underperforming, which are valid complaints), is meant to be a multirole aircraft (air and ground), and a replacement for the F15 and F16 aircraft.
The F-22 is meant as an interceptor (remember seeing those Russian bombers off the coast?) and to intercept and interdict aircraft and force them to perform/go a specific way, and also be superior in beyond line of sight fighting, since that's the world we live in
Since you seem to be somewhat knowledgeable on the subject, in your opinion, can the F-35 ever actually replace the F15 and F16? Both have been in service since the 1970's and are largely considered to be some of the most successful multirole fighters of all time. With the F35's ridiculous costs and underperformance issues, is it really going to replace its predecessors?