Gonna toss my hat into this mudfest.
YES, a vehicle with a MAX tow capacity of 5000lbs CAN tow a 5000lb trailer...HOWEVER, would you want to be at your max capacity ALL THE TIME when towing?
Would I recommend a vehicle which can do the job at it's maximum limit? No. Hell, I towed a 6000lb trailer across country using a Honda Ridgeline (5000lb max cap, with only 250HP) - so I know from stupid. (That's the ONLY time that truck will see more than about 2500 lbs on a trailer - between the mountains here and lack of engine, it's just not fun).
I'd recommend a tow vehicle that is at between 60-80% capacity when EVERYTHING is loaded. That includes fuel in the vehicle, gear in trailer, people and food in vehicle, etc, etc.
Towing at capacity is seriously not fun, and frankly dangerous, even more so for anyone who is *asking* about towing (i.e. lacking experience).
Just because a vehicle *can* tow a certain capacity doesn't mean I'd *recommend* that vehicle.
What I'd recommend is to find a vehicle that strikes a balance between the capacity required for towing, but isn't unusable when not towing.
How many miles/how many days you plan on towing? Across town twice a year? Get the minimum vehicle necessary. Thousand miles a month from May through Oct? Get a LOT more vehicle - something where it will be at less than 80% capacity when actually towing.
Why am I saying to keep the loading so low? Ease of driving and safety. More capacity you have (vs what you're towing), the better you can respond to less-than-ideal circumstances (traffic, accidents, sudden stops, avoiding stuff in the road, etc).