Welcome to the Forum! Thank you sooo much for coming here BEFORE camper purchase!
First of all, dry wt is meaningless to everyone except RV sales people. Nobody goes camping in an empty camper! Your tow vehicle (TV) must pull the entire weight of the camper, not just the dry wt. Use the GVWR (Gross Vehicle Weight Rating) in your calculations. It is more realistic.
Second, the towing capacity is for bragging rights ONLY! It is based on a bare naked no options except tow package version of the Ranier and the ONLY thing in the car is a 150 lb driver. No passengers, no cargo. Every pound of options and passengers and cargo reduces the tow capacity by the same amount. Now the GOOD NEWS. The basic Ranier is a fairly well equipped SUV, so it will not have 600 lbs of options to deduct!
Your 4000 lb dry wt will probably be around 5500 lb loaded weight, so you are clearly in the proper neighborhood for weight. I would not want to go any heavier, though.
Where will you be towing? While this does not really affect weight limits, you will be much happier towing on somewhat flat terrain than you would be towing in the Rockies.
Look at gently used campers. 1. You get more camper for the same $$. 2. Most new campers have several issues which are covered under warranty, but that often means MONTHS at the dealer waiting for repairs. A gently used camper will have these issues resolved, and you may choose less expensive, more responsive repair techs than the dealer. 3. If you love camping, you will probably want to upgrade to a bigger camper, and the trade will be less painful if you did not pay new prices to start with.
Read LOTS of threads here as well as Library articles and educate yourself on everything camper related.
Ask LOTS of questions!