Buying my first car, how old is too old?

I have made it into my mid-20s without ever having to own a car, but now I’m in the Pacific Northwest and need something to get around town occasionally and out the mountains on weekend. I have my eye on a used Honda CRV or Toyota Rav4. What I want to know is how old is too old and will be expensive to fix? And the same with miles, how many is too many? And finally, any advice between those 2 models? Toyota wins on reliability but Honda wins for safety (according to consumer reports). Any advice would be appreciated, thanks!