Between the two, which do you think is the better long term value?
2016 RAV4 LE, 58,000 miles, $19,800
2020 RAV4 LE, 22,000 miles, $26,000
I would have a pre-purchase inspection done before buying by a trusted independent mechanic. Both cars appear to have had oil changes every 5K miles.
Right now a brand new 2023 Rav4 starts at $28k msrp. Given this I would suggest paying a bit more and going with a new one especially since you're planning to keep the car and you're thinking of longer term.