You can't beat a Toyota if longevity is your goal. Stay away from the cx-5, it would be scary for you to actually enjoy point a to point b driving if you're not used to it.
Also if you care about resale value then stay with Toyota, people buy them because is a "Toyota" they actually cost a little more to purchase though. but there is no way RAV4 can hug the corners and have the same level of steering and brake feedback like CX5. again I think only 25% of buyer these days care about that "driving" part.